Counter-Strike surfing explained: how Source engine math builds speed

An article on healeycodes.com breaks down the math behind surfing in the Counter-Strike series, where players slide along steep ramps on maps such as surf_egypt and strafe from one ramp to the next. It opens with the surf_utopia world record, a 53.6 s run by saze from October 2025, and says the feel of surfing grew out of physics primitives released in Quake in 1996.

The starting point is the velocity vector: its direction is where you are heading and its length is your speed. The game moves the player along it every tick, usually 66 or 100 times a second. Speed is measured in units per second (u/s). A unit is roughly an inch at character scale, a player is 72 units tall, and walking with a knife is 250 u/s, about 6 m/s. The WASD keys set a second vector, the wish direction, relative to where the player is looking, and each tick grants some speed toward it.

The Source engine's Accelerate() function does not cap overall speed. It caps how much of that speed can point in the pressed direction. A player heading north at 250 u/s who swings east has no eastward speed yet, so the game grants some and total speed edges above 250. On the ground the excess is tiny and brief, because friction runs every tick and pulls it back.

In the air, AirAccelerate() applies. There is no friction, so existing speed is kept, and the wish speed is cut from 250 to 30 u/s. When a player flying forward presses D, rightward speed is about zero, below 30, so the game pushes right, sideways to the motion, and total speed rises a little. Holding D without turning only creeps up to about 252 u/s. Turning the mouse while holding D, so that "right" stays square to the flight path, gives a fresh direction and a new pool of 30 every tick, and speed builds. Switching to A and turning left builds it again.

Ramps are the other ingredient. A surface steeper than 45.57° does not count as ground. The game checks the height of the surface normal, n.z, which is 1 on a floor and 0 on a wall, against 0.7, the cosine of 45.57°. On a steeper surface there is no friction and no jumping, and air rules apply, so a surfer is technically falling the whole time. Gravity (sv_gravity, 800 across Counter-Strike) pulls at 800 u/s every second. The ramp removes the part of that pull going into it, and the rest points along the slope, turning falling into speed. On contact, ClipVelocity() strips the velocity going into the ramp and keeps the rest, so surfers try to land smoothly and match the ramp's direction.

Map makers can use roughly 46° to 68° without players sinking. To stay on, a player presses toward the ramp, an air push also capped at 30, and on very steep ramps gravity can win. Tick rate matters: the steepest ramp a player can hold moves from about 68° at 66 tick to about 75° at 100 tick. Curved ramps cost a little speed by default, while booster boxes using trigger_push add velocity every tick; one example takes a player from 260 to 1,599 u/s. The sv_maxvelocity limit, commonly left at 3500 u/s, applies per axis, so diagonal travel can reach about 4950 u/s horizontally, and about 6,062 u/s when falling is included.

The article then detours to strafe jumping, which it calls technically a bug. In a June 1999 .plan entry, written while making Quake 3, John Carmack called it exploitable but said his attempt to fix it changed normal running in an unfortunate way. The world record on Quake's e1m1 has dropped by almost 11 seconds over 28 years. The final section turns to the author's bot experiments: 120 "puppets" across a few servers, steered toward goals by a process using beam search, with an original goal of finding exploits on competitive Counter-Strike maps.

Key facts

  • Source's Accelerate() limits speed in the pressed direction, not total speed; in the air the wish speed cap drops from 250 to 30 u/s and there is no friction.
  • Surfaces steeper than 45.57° (normal height n.z not above 0.7) are not treated as ground, so surfers are technically airborne while gravity of 800 u/s per second feeds speed along the ramp.
  • The steepest ramp a player can hold rises from about 68° at 66 tick to about 75° at 100 tick.
  • The 3500 u/s default of sv_maxvelocity applies per axis, allowing about 4950 u/s horizontally and about 6,062 u/s with falling included.
  • The author's bot experiments use 120 server-side "puppets" directed by beam search, originally to find exploits on competitive maps.

Why it matters

The piece ties a skill that is hard to explain to a few concrete engine rules: a cap on speed in the wish direction, no friction in the air, and ramps that count as air. In the author's account, the makers wanted sensible movement, with a little air control so players would not feel locked into a direction after leaving the ground. Removing friction in the air also let players sweep the wish direction side to side and keep gaining speed.

The lineage goes back to Quake. Quake 1 movement is very similar to Source, with the same 30-unit air wish speed cap. In earlier e1m1 record runs top speed was around 416 to 508 u/s; later in 2001 it reached just over 1000.

Who it affects

Surfers get an explanation of why their technique works, and beginners get one for their main challenge, staying on the ramp. Map makers choose ramp steepness, curves and booster placement, all of which change how a map plays. Readers interested in Quake-descended movement get the strafe jumping history, including Carmack's reaction to what he called "hate mail" from strafe jumpers. The closing bot section concerns autonomous map exploration in the Source engine.

How to use it

To gain speed in the air, hold D or A and turn the mouse the same way so the pressed direction stays square to your flight path, alternating left and right to keep a single heading. Curving around corners adds speed too.

On ramps, press toward the face: A if the ramp is on your left. Land smoothly, with your direction matched to the ramp both horizontally and vertically. When leaving, steering up the face trades some forward speed for height to bridge a gap. Steeper ramps leave less usable horizontal space, drag you down harder and make launches more sensitive to input.

The article also renders the author's favorite maps, with a "0.7 rule" toggle that shades surfable ramps by steepness and a "teleports" button that shows how a level connects.

How solid is it

This is an individual technical explainer that argues from named engine functions and settings (Accelerate(), AirAccelerate(), ClipVelocity(), sv_gravity, sv_maxvelocity) and specific thresholds. The strafe jumping history rests on quotes from John Carmack's .plan. The choice of maps reflects personal taste: the author played many surf maps in 2005 and 2006 and says that shapes what counts as a good one. This retelling reaches only the opening of the bot section, so it makes no claim about what the bot achieved.

Risks and caveats

Several figures depend on settings. The holdable ramp angle changes with server tick rate, and the speed ceilings assume the 3500 u/s cap, a default that is commonly but not necessarily kept. Reaching the diagonal maximum depends on the ramp's angle to the map axes.

Speed is also easy to lose. A rough landing sheds the velocity going into the surface, curved ramps trim a little with each new angled piece, and the harder staged maps are very punishing: beginners should not expect to get past one or two stages.

“The Source engine's Accelerate() function doesn't cap your overall speed but it caps how much of your speed can point in the direction you're pressing.”

— The article's author, healeycodes.com