← Sun, Nov 29 digest

The Math Behind Counter-Strike Surfing

read article ↗ hn thread ↗

An exploration of the physics and math underpinning Counter-Strike surfing, detailing how Source engine velocity vectors, air acceleration, and ramp angles allow players to build massive speeds.

read it The detailed breakdown of Quake-descended movement code, ramp physics, and axis-bound velocity limits offers rare technical depth.

summary

The post breaks down how Counter-Strike's legacy Quake engine physics enable surfing down steep ramps. By combining air acceleration rules, lack of friction on surfaces steeper than 45 degrees, and mouse strafing, players convert gravity into sustained velocity. It also explains how per-axis velocity caps allow speeds beyond standard game limits, accompanied by the author's custom beam-search bot that autonomously solves surf maps. Live interactive map renders and lightweight visualizations anchor the explanations.

key points

  1. Surfaces steeper than 45.57° remove ground friction, treating the player as perpetually falling and turning gravity into forward momentum.
  2. The Source engine's sv_maxvelocity cap applies per-axis, allowing diagonal movements along ramps to theoretically reach speeds up to ~4,950 units per second horizontally.
  3. An autonomous beam-search bot leveraging 120,000 puppet-ticks per second successfully navigates complex surf maps within 1.3 seconds of world-record times.

who should read it

Game developers, engine programmers, and long-time FPS players interested in movement mechanics.

discussion warm

consensus

Commenters express immense nostalgia for early 2000s Counter-Strike mods, trading stories about learning movement quirks like bunny hopping and kz climbing maps while praising the article's live-rendered visualizations.

best comment by GranPC ↗

This was an absolute delight to read. Surf has a sweet spot in my heart -- it's what stopped me from driving up the walls when I injured my wrist and could only use one hand for long stretches of time. My mouse had a buncha buttons, so I mapped them to A, D, jump, and duck. I dunno why but I felt like ducking made me faster. Probably not, but... rituals, and maybe carried over from crouch jumping. :-)

One minor nitpick:

> Gravity pulls you down at 800 u/s every single second.

I was pretty sure it's actually 600. It turns out different Valve games use different values, so both are correct. …

A reader shares how surfing accommodated a wrist injury and clarifies engine-specific gravity default differences across Source games.

Generated by an LLM from the article and thread. Check the sources before relying on it.