← All notes

Surfing Is Mostly Falling

Update, 1 October 2026. Since this went up, the game's per-axis speed limit has been raised from 3,500 to 5,000 units a second, and the ledger has been run again. Only Event Horizon's run changed. At 3,500 the limit clamped the rider on 97 ticks there, those ticks carried over half of a 27 percent loss, and the limit took back more than the keys put in. At 5,000 the rider never reaches it: Event Horizon now loses 12.5 percent, the least of the four, and the ghost finishes in 23.63 seconds at a top speed of 3,878. The table and the section on the black hole course below are the new run's.

Surf is a game in the Tofte Simulators arcade. It plays like Counter-Strike: Source surf, on Source's own movement rules. You ride ramps too steep to stand on and strafe from one to the next. It now has two courses out in space.

  • Nebula is S-bends through a cloud, with planets hanging off to the sides.
  • Event Horizon is eleven ramps, each turned 26 degrees from the last, spiralling down round a black hole.

The space is scenery. The black hole sits under the middle of the spiral with its disc running out past the ramps. It fills the view below you all the way down, and nothing in the movement knows it is there. There is still gravity out there, 800 units a second squared, pointing down. A course with nothing to fall toward could not be surfed, and the rest of this post explains why.

Event Horizon in the Surf game: a line of ramps spiralling away over a black hole, the hole a dark disc ringed with light at the lower left and its glowing disc filling the view below

How a surf ramp works

Source decides whether you are standing on something by how upright it is. A surface whose normal points at least 0.7 of the way up is ground: about 45 degrees of slope or less. The game's tests drop a player onto ramps of 44, 46 and 60 degrees. On 44 the player stands. On the other two the player slides.

Steeper than that, the ramp is not ground at all. You are in the air as far as the game is concerned, so there is no friction. When you push into the ramp, Source takes away only the part of your velocity going into its face and leaves the rest alone. A test rides a 60 degree ramp with no keys pressed for two seconds. The speed along the ramp comes out exactly where it started. The height lost turns into speed: at least 95 percent of the 2gh that falling that far would give, and never more.

Where strafing comes in

In the air, your keys can add speed only until you are going 30 units a second in the direction they point. That cap is in Source's code, and it sounds like it should make air control useless. The trick is to point the keys square to the way you are already going. Then you are going 0 units a second their way, so every tick you get the full 30, sideways. Add 30 at right angles to a speed v and the new speed is the square root of v² + 30².

So holding a strafe key while turning with it gains speed, and the game's tests pin the exact amount. After n ticks of perfectly square strafing, the speed is the square root of v₀² + 900n. The game runs 100 ticks a second, so from 400 units a second:

  • one second of perfect strafing in open air gives 500;
  • ten seconds gives 1,029.

Sliding 1,000 units down a ramp face from the same 400 gives up to 1,327.

The ledger

Surf's ghost is a rider written for the game. It presses only the keys a player could, in the same movement code, and the tests have it finish every course. I replayed each of its runs a tick at a time and kept books. Everything is measured as energy per unit of the rider's mass, so the rider's weight drops out. Three things put energy in:

  • the drop, gravity times the height lost;
  • strafing, the energy each tick's air acceleration adds;
  • the few steps on the start platform, walking off it.

Everything else is a loss: clipping against a ramp face at an angle, catching an edge, and, on a course fast enough to reach it, the game's per-axis speed limit.

Course Ghost's time Top speed From the drop From the keys Lost Kept at the finish
Tofte 1 18.80 s 2,753 88.7% 11.3% 23.9% 76.1%
Tofte 2 31.69 s 3,466 89.4% 10.6% 16.2% 83.8%
Nebula 24.87 s 3,279 90.3% 9.7% 19.6% 80.4%
Event Horizon 23.63 s 3,878 92.5% 7.5% 12.5% 87.5%

Notes on the table:

  • Top speed is the speedometer's figure, horizontal speed in units a second.
  • The percentages are shares of the energy that went in.
  • The books close: what went in, less what was lost, equals what the rider carried over the finish, to within the rounding of the figures.

On every course, nine tenths of the energy is the drop. The keys add about a tenth. Every course loses more than the keys add, between 1.5 and 2.1 times as much.

A better rider would not change the picture much, and that can be shown rather than guessed. The most one tick of strafing can add is the 30-units-square case above. Strafing perfectly square on every tick the ghost spends off the ground would add, at most:

  • 10.9 percent of what the drop gives on Event Horizon;
  • 15.7 percent on Nebula;
  • 17.9 percent on Tofte 1;
  • 18.2 percent on Tofte 2.

The ghost already gets 63 to 71 percent of that ceiling.

The black hole course drops furthest

The spiral drops further than any other course: 11,052 units from start to finish, against Nebula's 8,155. Event Horizon is the fastest of the four: the ghost's top speed there is 3,878 units a second, the highest in the table. It also keeps the most of what went in, 87.5 percent.

None of the four courses reaches the game's per-axis speed limit, now 5,000 units a second. When the limit was 3,500, Event Horizon was the one course that hit it, and there the limit took back more than the keys put in.

So the course themed on the one place nothing escapes is the one where the ghost goes fastest.

Nebula in the Surf game: a crimson ramp running away under a galaxy sky, with a banded blue planet and a small grey one hanging beside the course

Where the numbers come from

The movement follows the rules in Valve's Source SDK. Its licence allows its code only in games on Valve's own engine, so none of it is in the arcade. The movement is written from the physics, and a script checks every Source number and rule against a download of the SDK's files:

  • the gravity of 800;
  • the air cap of 30;
  • the 0.7 ground normal;
  • the friction and stop speed;
  • the four bumps a move gets against walls.

The game makes three choices of its own and says so. Air acceleration is 150, because surfing wants a lot of it. It runs at 100 steps a second. And its speed limit is 5,000 units a second along each axis. None of them is a number from the SDK.

The ledger is the same kind of check as Little Rocket's delta-v books, where every metre a second the engines give is accounted for. Here every unit of energy is accounted for, and the account says the ramps do the work. The keys steer.