sxsphinxstack

Projects / A speedrun game with a real leaderboard

A speedrun game with a real leaderboard

Level 3: a month or more, real users. Use with: build-a-game, backend-basics, database-basics. Resume line when done: Built {project_name}, a speedrun game with a server-side leaderboard and submission validation — live at {url}

Brief

One short, skill-heavy level (a platformer sprint, a maze, a precision mouse course, a typing gauntlet) timed to the millisecond, where finishing posts your time to a leaderboard that lives on a server. Anyone can see the board; beating a time on it is the whole game. The engineering test is submission honesty: the server issues a run token when a run starts, sanity-checks every submitted time, and refuses garbage, so the board stays worth fighting over. Finished means two named friends have traded the world record back and forth without you in the room.

Personalize

Milestones

  1. Design note in the README: the level, the movement rules, your estimate of the fastest possible time and how you got it.
  2. Movement prototype on a blank canvas; tune until moving around is fun with no level and no timer.
  3. The level with start and finish lines, and a millisecond timer that starts on first input and stops at the finish.
  4. End of week one: the level is deployed, runnable, and restartable with one key, with your local best shown.
  5. Backend: a scores table (name, time, date), a submit endpoint, a top-50 endpoint.
  6. Leaderboard page in the game: top times, your rank highlighted, updated right after your run.
  7. Run tokens: the server issues a token when a run starts and only accepts a submission carrying one, once, and only after enough real time has passed since it was issued.
  8. Submission checks: reject times below your stated floor, names too long or filthy, and duplicate tokens. Log rejected submissions.
  9. Try to cheat your own game with curl: submit a fake world record from the command line. Make the obvious attacks fail, then write in the README what a determined cheater could still do and why that is acceptable at this scale.
  10. Juice: a run-end screen with time splits versus your best, a world-record fanfare, a ghost line of your best run if you are feeling strong.
  11. The rivalry test: both named rivals grind it on their own machines. Watch the board, fix what the grinding surfaced, ship.

Done means