Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds stats recording to a local SQLite database.
Status
This is the version currently installed on the Lexitron for the Louisville Arcade Expo, Lexington Comic and Toy Convention, and the Danville Arts Center gallery installation.
I haven't merged this into master yet because it currently blows up if you don't have the SQLite binary in your PATH or alongside the moonshot binary. Looking for a solution there.
Data Recorded
Implementation
The stats module uses SQLite via the command-line executable because I couldn't find a good native JS library for Windows. They either needed to compile a binary against SQLite libs (using MSVC++ or somesuch) or operated entirely in memory, requiring periodic dumps to disk (yuck). The command-line
sqlite3
executable needs to be available on the system PATH or copied to the same directory as the moonshot executable.DB Schema
Table name:
stats
game_error
or elapsed time forgame_end
)Notes
This updates the Moonshot version number from 0.1.0 to 1.0.0 because swagger.
This also updates the project for NW.js, which is based on node v0.11-0.12. The project now uses some child_process APIs that are specific to v0.11+. Sorry to combine all the font changes in here; they're needed for the new NW.js.
This doesn't include any UI or tools for getting data back out of the DB. That would be a good first secret code, no? 💃