-
Install the userscript: tagpro-vcr.user.js.
-
Play a game of TagPro.
-
Upload the recording to the VCR: https://keratagpro.github.io/tagpro-vcr
The userscript records WebSocket messages coming from the server and stores them with timestamps into a newline-delimited JSON file. More specifically, every line is an array consisting of a timestamp, the event name and event data. For example, this is an event for playing the burst sound at 14.52s:
[14520, "sound", { "s": "burst", "v": 1 }]The VCR webpage runs the original game client code (global-game.js), but replaces the socket.io library with a "fake socket" that replays the recorded events.
- Install lerna globally:
npm install --global lerna - Run
lerna bootstrap(runsnpm installin sub-packages) - Run
lerna run build(runsnpm run buildin sub-packages)
To automatically recompile when source files change, cd to sub-package directories and run npm run watch.