Software Development
Software development in Data Games falls roughly into four areas: Embedding Flash games in Fathom and TinkerPlots, web application development, game development in Flash and Javascript, and backend server maintenance of documents, users, and logs. What we have done in each area is explained below.
Embedding Flash Games in Fathom and TinkerPlots
The central idea of Data Games is that simple games are embedded in a data analysis environment. Because KCP Technologies is the developer of Fathom and SRRI is the developer of TinkerPlots, a natural first step was to embed games as Flash components within these two desktop applications. The fact that Fathom and TinkerPlots share a common framework meant that this was a single task rather than two separate tasks.
In the picture below the game of Markov is embedded in Fathom.
Note that the game generates two collections, one for the individual moves in the game, and another for the game results. A game in TinkerPlots looks similar. We are not planning to release the versions of Fathom and TinkerPlots that have this capability.
We were faced with the decision of whether to continue the project based on this prototype or to switch to a web-based environment. Based on our desire to make the games and activities available to a wide audience, we decided to move from the desktop software, as container, to a web application running in a browser, as container.
Web Application Development
By Fall 2010, we had sufficient capability in a Data Games web application that we could begin to pilot it at Galileo High School with students. By Summer 2011, the web application was ready for use in a summer institute preparing teachers for a year's field testing.
We call the web application DG. DG is compatible with all modern browsers running on desktop computers and marginally compatible with browsers running on smart phones and tablets. We expect that a round of performance enhancement and bug fixing will make DG fully compatible with these latter by Fall 2012. (Although game components that use Flash don't run on iOS.)
DG is built entirely using HTML5, CSS3, and JavaScript. The application framework is provided by SproutCore 1.7. DG uses Raphaël as an SVG-based rendering engine.
- A document is component-based. At this time available components are:
- Game
- Graph
- In the graph component all transitions are animated.
- In dot plots and scatter plots points can be dragged, dynamically changing their values. When they are released they animate back to their previous values.
- Rescaling of numeric axes is done dynamically by DG to fit the data, and can be done manually by the user by dragging.
- Attributes are assigned to axes either by dragging from a case table or by choosing from a popup menu on the axis.
- Attributes dropped in the center of a graph populate the graph's legend.
- All plots are case-based (each case is represented by a point.)
- Scatter plots accommodate movable lines, plotted functions, and can show squares of residuals.
- The user can place a movable line or plotted value on a dot plot.
- Case Table
- Slider
- Text
- Calculator
- Case selection is dynamically linked so that cases selected in one component are selected in all other components.
- Most user actions are logged; in addition, the game component can write to the log.
- Components can be moved and resized.
- Users with accounts can save documents for later retrieval.
Game Development in Flash and Javascript
All games were initially prototyped in Flash. Games that survived pilot testing are being reimplemented in JavaScript.
A game communicates with DG using a simple Application Programming Interface (API) with which it can specify a collection and its attributes, add cases to the collection, request that a string be logged, and a few other things. We expect to publish this API and make it possible for others to provide game components.
Backend Server Software
DG, the client-side software, makes requests of a backend server to determine if the username and password entered by the user are valid, to log user actions to a database, and to store and retrieve documents. This server-side software is all written in PHP.