Snake with Replay
The classic, plus a recording of every game you can watch back.
BeginnerWeb appGame6–14hAI-buildable 4/5no setupworth shipping
Snake is a two-hour build; the replay system is what makes it interesting. Record inputs rather than frames and the whole game can be deterministically replayed from a tiny file — the same technique real games use.
UI
Logic
Useful
Hosting · Free forever
Deploys free on GitHub Pages, Cloudflare Pages or Vercel Hobby.
Deploy it and share a link.
Core features · 7
- Grid-based snake movement with growth on eating
- Collision with walls and self ends the game
- Speed increases as the score climbs
- Inputs are recorded rather than frames
- Any past game replays deterministically from its input log
- Replays can be scrubbed and stepped
- High scores persist with their replays
The interesting part
- Determinism, which means a fixed timestep and seeded food placement
- Preventing the reversal bug where a fast double input kills you
- Keeping replays valid as game logic changes
Once it works
- Add a ghost of your best run alongside the current one
- Add wrap-around walls as a mode
- Add shareable replay links
Suggested stack
reacttypescripttailwindcanvas-apilocalstorage