Install: Firefox Marketplace
ROTOGAMEsq has originally been written from scratch for the 2012
js13kGames challenge. The version that has been submitted to the challenge
is tagged (GIT):
How to start development environment
Bring dependencies up to date:
Set environment variables:
Or with nodemon:
nodemon --watch .
Open Web App
ROTOGAMEsq supports installation as Open Web App. Once installed, it can be run offline. To test installation, open the relative URL:
The manifest is located at:
How to add a board
Add the tiles for the start and end to:
Note: Making the image too large can trigger a Bugzilla@Mozilla bug 1314597 on the Fx0 smartphone.
Add the description to:
Limit board names to eight alphanumeric characters, even though they are flexible: Any string that goes as a Redis key should work.
Portrait and landscape layouts: To give optimal user experience espcially on mobile devices, the game adapts the layout depending on whether the browser's viewport is in landscape (width > height) or portrait mode.
Undo/redo is accessible by standard keyboard shortcuts: Ctrl-Z / Command-Z, Ctrl-Y / Shift-Command-Y
The hiscores for each board are stored in a Redis database.
On the server, every hiscore entry is tested for plausibility (do the rotations really solve a board). This prevents cheating by forging client server communication.
With every hiscore entry, rotations are stored, which makes it possible to manually investigate some of the more astonishing solutions.
localStorage is used for offline capability:
On client load (communication via WebSocket, automatically repeated until connection is available):
hiscores are retrieved from localStorage,
updated hiscores are requested from the server,
unsaved hiscores are sent to server.
On new hiscores on server: new saved hiscores broadcasted to all clients
On new hiscore entry on client: unsaved hiscores sent to server
Hiscores may be inspected via the Redis CLI:
To show hiscores of board
ZRANGE smiley 0 -1 WITHSCORES
To show rotations associated with hiscores for board
To list all boards with recorded rotations (= all boards with hiscores):
Variable name postfixes of coordinates and dimensions denote units:
T: multiples of tiles (tile coordinates)
no postfix: pixels
Hard coded values
In various places the following values are assumed:
Maximum number of rotations: 99
Maximum number of hiscores per board: 7
Maximum number of characters in name in hiscores: 8
Releasing a new version
Version number schema: major.minor.patch
Add tag in GIT.
Object.freezeis not used due to Android 2.3's native browser not supporting it.
Tiles are rendered to
canvas. This may look cumbersome: Can't tiles be rendered simply as squared
divtags? They can. However, in major browser
divtags cannot be positioned with sub pixel accuracy (as of September 2012). In these browsers, positions are rounded to pixels and the result is irregular spacing, e.g.: one spacing 2px, another one 3px
For similar reasons (possible subpixel positioning issues), the rotation is not done using CSS3 transformations.
Format for comments: Mardown
README.mdhas some ugly formatting of lists, to work around a bug in GitHub's Markdown interpreter.
Browsers to test on, as of November 2012: Firefox, Chrome, Opera, Android 2.3 browser, iOS Safari, Firefox OS
- Maria Morillas: boards ebunny (easter bunny), pumpkin, mushroom, and santa all copyright 2013 and licensed under a Creative Commons Attribution 3.0 Spain License.
Except where noted otherwise, files are licensed under the WTFPL.
Copyright © 2012–2016 Felix E. Klee
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the COPYING file for more details.