How Tabletop Champions stops leaderboard cheating
The Tabletop Champions demo puts a global leaderboard on every track and car. A leaderboard only works if you can trust the times at the top, and a lap time from a browser is just a number in an HTTP request — anyone can open DevTools and post whatever number they like.
So the server throws away the number your browser sends. Instead, it drives the lap again itself.
What does your browser actually send?
Whenever a time-attack lap beats your personal best on a board, the game sends three things: the lap time, a ghost showing where the car went, and a tape of your raw inputs.
The race simulation ticks at 120 steps per second. At every step it reads three inputs: how much gas, how much brake, and where the steering wheel is pointed. The tape is simply that sequence of readings from start line to finish, packed tight. A full lap driven on a keyboard comes out to a few hundred bytes.
How server-side replay works
The server runs the exact same race code as the browser. It drops the car on the start line of that board's track, alone, and feeds your input tape into it step by step until the car crosses the finish line.
Whatever lap time that run produces — and the ghost the server records while driving it — is what gets filed. Both the lap time and the ghost your browser uploaded are discarded. Every time on a leaderboard is a lap the server drove itself, and every ghost you race is guaranteed to match the lap it represents.
That only works because the simulation is deterministic. There is no randomness in a solo run, and with one car alone on the table nothing carries over from earlier laps. Feed the same inputs into the same track and car and you get the exact same finish time, down to the millisecond. Automated tests check that guarantee on every track. On the server, replaying a lap takes between a few milliseconds and fifty milliseconds.
What the server checks before running a lap
Before spending CPU time on a replay, the server runs four cheap validation checks:
- Tape size and legal inputs. A tape can hold at most ten minutes of steps, and every input has to stay within what a real controller can send — gas and brake from off to full, steering from full left to full right.
- Board fingerprint. Every leaderboard is keyed by a fingerprint of the track layout, the car's handling numbers, and the shared physics. Change any of those and the affected boards start fresh; laps recorded on older physics are refused. Every time on a board was driven under identical rules.
- Matching track and car. The server replays your tape only on that board's own track in that board's own car, so a fast lap from another circuit cannot slip onto the wrong table.
- Time attacks only. Only a solo, standing-start time-attack lap qualifies. Laps from pack races or local four-player Party games never go on a board.
Can server replay catch non-human inputs?
No. Replaying a tape proves that a set of legal inputs actually produces that lap time — it cannot prove human fingers pressed the keys.
To guard against scripted or tool-assisted runs, every board has a sanity floor anchored to the game's own computer driver running a clean standing-start lap. Any submission that comes in suspiciously far below that pace is held off the public board for manual review. Held laps are never silently deleted — they stay in a queue until I can inspect the replay and confirm them.
How the leaderboard stores laps and ties
Every verified lap is written to an append-only log, so submitting a new run never overwrites an older one. Your spot on a leaderboard simply points at your fastest entry in that log. Set a quicker lap and the pointer moves; match an existing time to the millisecond and the earlier run stays ranked ahead, so whoever set the time first keeps the tie-break.
Tabletop Grand Prix — the time-attack game that Tabletop Champions grew out of — verifies its laps the same way.
You can put the whole thing through its paces in the demo at tabletop-champions.typeonce.games: lay down a lap, open the board, and race the ghost of whoever sits one place ahead of you.