Skip to content
GamingExplainer

Counter-Strike surfing is falling, done very precisely

Surf maps turn a 1996 Quake movement quirk into a sport: no friction in the air, a 30-unit speed cap, and ramps steeper than 45 degrees. The engine's own code confirms the math.

A lone surfer riding a great teal-green wave that rises like a steep ramp, in the manner of a Japanese woodblock print, with a single red sun in a warm sand-colored sky
A surfer on a wave that is also a ramp, in the manner of a Japanese woodblock print.
On this page

In brief

  • Surfing runs on two engine rules: no friction in the air, and a 30-unit cap on the speed the game adds in the direction you ask for.
  • A ramp steeper than 45.57 degrees counts as air, so gravity pulls you along it instead of slowing you down.
  • The server speed cap applies per axis, so the fastest legal speed is diagonal: about 4,950 units a second, or 6,062 in three dimensions.
  • The trick descends from Quake's strafe jumping, which John Carmack called an exploitable bug in 1999 and left in the game.

Watch a good surfer in Counter-Strike and the game seems to forget its own rules. The player slides sideways along a steep wall, picks up speed instead of losing it, launches off the end of the ramp, and lands on the next one without ever slowing down. No engine, no jump button held down, no cheat. Just a wall, gravity, and a player who knows which keys to hold.

The trick is not a cheat. It is arithmetic, and it has been sitting in plain sight since Quake shipped in 1996. A programmer who builds bots that teach themselves to surf, Andrew Healey, wrote up the full explanation this week, and the numbers check out against Valve's own published engine code. Surfing is what happens when three small rules collide: the air gives you no friction, the game only ever adds speed in the direction you ask for, and a steep ramp counts as air.

The 30-unit rule

Every tick, usually 66 or 100 times a second, the engine asks the player one question: which way do you want to go? The keys pick a direction relative to where you are looking, and the game hands you some speed in that direction. The function that does it in the air is called AirAccelerate, and it has a quirk that defines the sport.

On the ground, the wish is generous: hold W with a knife out and the game lets you ask for 250 units a second, roughly a fast jog. In the air, the same wish is cut to 30. That number comes straight from Valve's published Source SDK, where the air speed cap is defined as exactly 30. And the function only ever adds speed in the direction you asked for, up to that cap. It never looks at how fast you are already going overall.

That is the loophole. Fly forward at 250 and press D, and the game asks how much of your speed already points right. The answer is about zero, so it hands you up to 30 to the right. Your total speed creeps up a little. Turn the mouse so that "right" stays square to where you are flying, and every tick hands you a fresh 30 in a fresh direction. Hold D without turning and you drift up to about 252 and stop. Turn with it, and the speed keeps building.

On the ground, friction would eat the gain within a tick or two. In the air, there is no friction at all, so whatever speed you have built, you keep. The engine's designers meant the air control to be a kindness, a little steering so a jump does not feel like being frozen to a direction. The kindness is the exploit.

Ramps are falling, redirected

Air alone is not enough. You need somewhere to fall from, and that is what the ramps are for.

The engine decides whether you are standing on something by looking at the surface's normal, the arrow pointing straight out of it. If that arrow's height is 0.7 or more, the surface is ground. Below 0.7, it is not. The cosine of 45.57 degrees is 0.7, so any ramp steeper than about 45.6 degrees is, as far as the physics is concerned, air. You cannot stand on it, you cannot jump from it, and there is no friction on it. You are perpetually falling.

Gravity does the rest. Counter-Strike pulls you down at 800 units a second, every second, and the ramp takes the part of that pull that points into it and leaves the rest pointing along the surface, down and forward. Falling becomes speed. When you touch the ramp, the engine clips away only the part of your velocity that points into the surface and keeps the rest, so a smooth landing costs almost nothing. That is why surfers obsess over landing parallel to the ramp, in the same direction, horizontally and vertically.

The ramp cannot be too steep, either. Map makers work in a window of roughly 46 to 68 degrees. Steeper ramps leave less horizontal room for the same height, drag you down the face faster, and make the exit angle harder to judge. Past the limit, gravity drags you down faster than the 30-unit air push can hold you against the face, and you sink through. The server's tick rate moves the limit: the steepest ramp a player can hold is about 68 degrees at 66 ticks a second and about 75 at 100, because more ticks mean more pushes a second.

The speed cube

There is one more limit, and it has a shape. Servers cap velocity with a setting called sv_maxvelocity, which Healey puts at a usual default of 3,500 units a second. What matters is how the engine applies it. In Valve's code, the clamp runs once per axis: each of the three components of velocity is limited to 3,500 on its own. Nothing limits the total.

So a player flying straight along one axis stops at 3,500. A player flying diagonally, splitting speed evenly between two axes, can reach each axis's cap at once, and the total is the square root of 3,500 squared plus 3,500 squared: about 4,950. Add the third axis, falling as well as flying diagonally, and the corner of the cube is the square root of three times 3,500: about 6,062. The fastest legal speed in Counter-Strike runs diagonally, toward a corner.

Three cubes showing the speed cap applied per axis: 3,500 units a second along one axis, about 4,950 diagonally across two axes, and about 6,062 at the three-axis corner
One cap, three speeds. The server speed cap applies to each axis on its own, so the fastest legal speed is diagonal. Cap values as given in Healey's post; the per-axis clamp is in Valve's Source SDK. Source.

Map makers know this too. Some staged maps hand you speed directly with booster boxes, volumes that push you every tick you spend inside them. Healey's example: enter one at 260 units a second and come out at 1,599.

A bug Carmack kept

None of this was designed. It descends from strafe jumping, the Quake technique where players turned and jumped in rhythm to build speed far past the running limit, using the same air-acceleration rule. In June 1999, while building Quake III Arena, John Carmack wrote in his .plan file that "strafe jumping is an exploitable bug," and that when he tried fixing the code so that it just did not work, "it changed the normal running movement in an unfortunate way." He left it in.

Surf maps grew out of that decision. Healey says he played them back in 2005 and 2006, and the community has been refining them ever since: curved ramps that trade a little speed for flow, staged maps where each section is harder than the last, and a competitive scene with world records. The post opens with the current world-record run on surf_utopia: 53.6 seconds, set by a player called saze in October 2025.

The bot that learned to surf

Healey's own contribution is a bot. He runs 120 software puppets across a few servers, each given faked inputs, and scores them on a simple goal: get closer to the finish, faster, and along the route. The servers run at ten times real speed, about 120,000 puppet-ticks a second across the fleet, and only the best copy in each grid cell survives to the next round. In one section of surf_leet_xl_beta7z, 6,317 tries produced 451 deaths and 37 puppets through the door.

The result is a 19.47-second run, roughly 1.3 seconds slower than the world record, and it looks human. The puppets strafe, turn, and trade speed for height the way a person would, because the scoring function rewards exactly the things a person learns: speed along the route, and height that can be spent later.

The bot was not built for surf maps. Healey's original goal was to find exploits on competitive maps, and he says he has not found anything novel yet. So he pointed the puppets at his favorite surf map instead. Whether the same search turns up something new on a map people actually compete on is the open question, and it is a sharper one than it sounds: the puppets try everything, including the lines no human would think to try.

Try it yourself

The fastest way to understand any of this is to load a surf map and slide down one ramp badly. The physics is 30 years old, it is still there in every server, and it rewards exactly one skill: knowing which direction to ask for, one tick at a time.

Related reporting

More from grep.tips

All articles