Version 1 (modified by ddickison, 6 years ago) (diff)


Design and Implementation Notes


A glossary and operational definitions for the various parts in implementing fluency tasks.

Game Controller

The game controller is the toplevel entity that determines which levels are presented to the user, and instantiates levels and game engines. The game controller may be a website, standalone application, or a part of a different product such as when presenting fluency tasks in the Middle School Math Cognitive Tutor.

In order to start a game, the game controller selects a level and instantiates a game engine. It is TBD how levels and game engines are linked together:

  • One possibility is to have the level specify a specific game engine and skin.
  • Another is to have an abstract "task" entity which is referenced by questions and by game engines. This creates a many-to-many relationship between questions (or question sets) and game engines, which allows the game controller to choose from multiple game engines to complete a single level or question set. DD: Personally I think this is overkill.

Question Hierarchy

The question hierarchy defines grouping of mathematical tasks the player experiences.

  • Level or Stage: groups together question sets of similar difficulty and skills; specifies medal cutoffs; shares parameters. Levels are presented to the player by the Game Controller, which may present them sequentially, by user selection, or some other criteria.
    • Question Set: One "run" of the game for the player. Scores are tallied up after each question set.
      • Question Subset: A group of consecutive questions that share some characteristic, e.g. the target fraction in the fraction-comparison driving game engine. This might not be applicable to all game engines, in which case we can just have a single question subset.
        • Question: A task for the player that requires a single action or decision.


  • "Stage" may be a better name than "Level" so as to avoid confusion when talking about "levels of the question hierarchy".
  • This hierarchy is very similar to what Cognitive Tutor currently uses in unit files. Perhaps we should adopt the same terminology.
  • The naming and structure affects data collection and processing. We may want to adopt terminology from DataShop? to ease data export to that format.

Game Engine

A game engine is the code and resources that runs a single type of fluency task that employs particular game mechanics. Examples include the fraction comparison engine and number line engine.

Game engines can have variants called skins. Each skin looks different but share the same game mechanics. An example is the snowboarding and racing car variants of the fraction comparison game engine.

HTML5 Game Libraries

Games will be implemented using HTML, CSS, and JavaScript? for maximum compatibility on any modern browser without plugins. The following table shows some browser-based game engines that may be useful. Because we will be releasing our work as open-source, engines with commercial licenses may not be usable.

Engine License Rendering Compatibility Maturity Notes
 GameQuery  MIT DOM I had trouble loading some demos on Chrome and Safari. Around since 2009; 0.5 in July 2010. jQuery plugin. Small library, appears to be lightweight but functional for sprite animation.
 Propulsion MIT Canvas 1.0 in January 2011. Very little  forum activity. The only available demo is really lame, and the documentation is sparse (class reference only).
 Rocket Engine Commercial? Canvas, WebGL, falls back to Flash? ? Very little information, and still under development. Integrated editor environment.  Acquired by Disney March 2011. It appears professional/commercial so probably unsuitable for this project.
 The Render Engine  MIT Canvas and DOM Some demos don't work in Chrome. Around since 2008. 2.0 will enter beta "soon" as of  April 2011 Appears full-featured, particularly for an open-source library.
 Impact  Commercial Canvas Fairly active  forum community, good documentation. This seems to be a solid framework, but the license may prevent us from using it for this project.
 Effect Games  ? DOM (may be Canvas or WebGL in the future) Appears to be mature and well-supported. Must be developed and hosted on Effect Games servers?
 GMP (GogoMakePlay)  MIT or GPLv2 No sound. Really basic.
 CopperLicht Free but not open-source.  Commercial license for source code. WebGL 3D. Not really for 2D arcade-style games.
 Crafty MIT or GPL Canvas or DOM Some demos don't work in Chrome. ?
 GameJS Hosted on GitHub? but license not listed. Canvas Port of PyGame? to JavaScript?.
 CAKE MIT Canvas Demos look slicker than most. Has an SVG parser.
 ForPlay | Apache License 2.0 Canvas, DOM, WebGL If it's good enough for Angry Birds… Built on Google's gwt. Code in Java, cross-compile to HTML5, Java, Android.


HTML5 has the <audio> element, as well as access to the Audio API from JavaScript?, but it seems that most current HTML5 game implementations fall back to a small Flash container for playing game sounds due to poor browser support for mixing multiple HTML5 sound sources. There are libraries for handling sound effects with automatic fallbacks to Flash on browsers lacking sufficient HTML5 capability, most notably  SoundManager 2.