CARVEMANIA Play

How Every CarveMania World Record Is Checked

By Alec Salisbury, who makes CarveMania ·

A leaderboard is only worth chasing if the times on it are real. In most browser games a score is a number the game sends to a server, and the server takes its word for it. CarveMania doesn't. Every time on a board has been skied again, on our server, from the same inputs, before it counts.

A run is its inputs

A CarveMania run is a list of what you pressed, moment by moment: left, right, tuck, nothing. The game steps its physics 120 times a second, and each step depends only on where the skier was and what you were pressing. Nothing in it is random, and nothing depends on your screen's frame rate or how fast your device is.

That property has a name: the physics is deterministic. Give it the same course and the same inputs and it produces the same run, to the last decimal, on a phone, a Chromebook, a gaming PC or a server. It took care to get there: different processors and browsers can give slightly different answers to some maths, so the physics sticks to arithmetic that comes out the same everywhere.

What happens when you finish

When you cross the line, the game sends your inputs along with your time. The server loads the same course, runs the same physics over your inputs and gets its own time. If it matches, and every gate was passed, the run goes on the board. If it doesn't, it doesn't.

Because the server checks the run itself rather than the number, a time can't be typed in or edited on the way. The only way onto the board is to ski the run.

Why ghosts and replays are exact

The same property makes ghosts work. When you race the leader's ghost, your game is not playing back a video or a list of positions: it is skiing the leader's inputs through the physics, live, beside you. The ghost is exactly the run that set the record, gate for gate. A challenge link from a friend works the same way, and so does the TV replay after your run and the analysis that shows where you gained or lost time.

It also means a run is small. A full downhill is a few kilobytes of inputs, not a recording, so every board can keep the runs behind its top times for anyone to race.

The Course Setter is a run too

Every official course has a Course Setter time: the game's own racing line, the time between Gold and the hidden medal past it. The Course Setter isn't a number someone typed in. It is a run like yours, a list of inputs skied through the same physics, and it is checked the same way. When a course or the physics changes, its run is skied again so its time stays true. You can race it as a ghost, and each course page lists its time and speed at every split, worked out by replaying its run when the site is built.

The splits you see while racing come from the same place. At each split the game compares your clock with the run you are racing, so the gap shown at a split is the real gap at that point of the hill, not an estimate.

Missed gates and the boards

Miss a gate and two seconds go on your time and you ski on. That run still counts for your own medals and personal best, so you can see your progress. But only a run with every gate goes on the leaderboard: a world record has to be a clean run.

When the physics changes

Because a run is its inputs, a change to the physics changes what those inputs produce. When the game's skiing changes in a way that would move the top times, the boards start fresh for the new version, so nobody's record was set on different snow from the run chasing it. When a change doesn't touch the fastest lines, the boards stay as they are.

See the records

The world records page lists the record and the top 10 on every official course. Each course page has its own board, the Course Setter's time and the medal times, and in the game you can race any of the top runs as a ghost. To post your own, learn the controls and finish a clean run.

Play CarveMania

More guides