Beta, untested. Bring an older HTML5 game project up to date without breaking it. A scanner that finds dated or broken parts (Flash leftovers, http assets, sync XHR, document.write, setInterval loops, frame-based movement, fixed canvas sizes, no touch or viewport, blocked audio, Ogg-only sound, alert, keyCode, jQuery, Phaser 2, CreateJS, Construct 2 exports, globals) and orders them into a plan...
Download skill (.zip) Files on GitHubGame modernization
Beta: this skill is new and has not been tested yet. It is still being improved. Check its results carefully and say what goes wrong.
1. Protect the original
Commit it as is (or copy the folder). Record a short playthrough or take screenshots of each screen, so every step can be compared with how it was.
2. Scan
python3 scripts/modernize-scan.py old-game/ --out docs/MODERNIZE.md
The plan comes in four phases:
- Make it load and run: http assets, sync XHR, document.write, Flash parts, viewport.
- Make it play on phones and new screens: touch, scaling, dt movement, requestAnimationFrame, audio unlock, formats.
- Small cleanups: keyCode → code, pause on hidden tab, safe saves, the Bash SDK.
- Bigger moves, only if needed: modules instead of globals, jQuery out, an engine upgrade.
3. One step at a time
Do one item, run the game, compare with the recording, commit. Never upgrade the engine and change gameplay in the same step. Engine upgrades (Phaser 2 to 3, CreateJS to plain canvas) are rewrites in disguise: plan them like a remake (game-remake-planning).
What not to change
The feel: speeds, jump arcs, timings and difficulty are the game. When adding dt, convert speeds so they match the original at its frame rate (a speed of 4 per frame at 60 fps becomes 240 per second).
Pitfalls
Rewriting everything at once, “fixing” the feel by accident with dt, dropping old features nobody knew were used, and modernizing without a way to compare with the original.