The gap
Rhythm timing in a browser is easy to get wrong: frame-based judging, audio played late on phones and Bluetooth, and no way for players to fix it.
Game templates
The complete source of Shiftmere 2.0, a rhythm drag racing game: the engine is the beat, fire on it, shift to slow the tempo.
Coming soon
Source code for developers, not the game itself. Not published on its store yet, so there is no buy or download link. PN Scripts does not take payment for it here.
The gap
Rhythm timing in a browser is easy to get wrong: frame-based judging, audio played late on phones and Bluetooth, and no way for players to fix it.
What it is
This template judges every input from its own event timestamp, schedules sound ahead on the audio clock using the measured output latency, and ships a tap-along calibration page.
How you use it
Unzip, serve the folder and open index.html, then edit game.js; npm test plays it again in headless Chrome.
Source code of a real, playable game to reskin and learn from, with a smoke test whose bot plays it.
Use it when
Built for
Each engine lists where it fires in one crank cycle; the cycle's length comes from the revs, so the tempo rises as you speed up and drops at every shift.
Inputs carry their own timestamps; the race clock runs on the wall clock and the audio is scheduled so it is heard on the beat. A calibration page measures the player's delay.
Plain JavaScript and Canvas 2D; open index.html through any static server and edit game.js.
25 unit tests of the core, 82 headless Chrome checks (real-time strokes judged from timestamps, phones, menus, sound levels) and a smoke test whose bot races.
1 of 3
| Platform or runtime | Supported versions | Tested up to |
|---|---|---|
| Node.js | 22.12 or newer | Not stated |
The template is finished and tested. It is not on sale yet; this page will say where to get it when it is.
Coming soon
Source code for developers, not the game itself. Not published on its store yet, so there is no buy or download link. PN Scripts does not take payment for it here.