# CSS / KSF movement reference

Updated 2 October 2026 after importing the actual CSS Boreas map and acquiring independent KSF telemetry. Target: **Counter-Strike: Source, KSF forward style, 66t**. The exact native executable build and live plugin manifest remain unknown. This document supersedes `REFERENCE-v1.md`.

Evidence labels: **Verified** means a primary source or independently recorded behavior; **Supported** means consistent with the tested CSS run and relevant implementation but not a complete live-server configuration dump; **Unresolved** remains a fidelity limit.

## Interval and branch

The simulation interval is **float32(0.015) = 0.014999999664723873 seconds**. Nominal “66 tick” means approximately 66.6667 Hz, not `1/66`. Valve declares `DEFAULT_TICK_INTERVAL = 0.015`. The public KSF Boreas replay viewer independently specifies 66.66666666666667 ticks/sec; its gravity/displacement steps support 15 ms. [Valve constants](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/src/public/const.h), [actual KSF replay](https://ksf.surf/replays/surf_boreas/replay_css_4060_0_712551_1763914843.rec).

The public SDK is shared Source code, not the shipped CSS movement binary. Its HL2/TF2 defaults are not automatically CSS facts. CSS-specific branches in RNGFix and CSS-derived Momentum code are supporting references; Momentum intentionally changes several jumping, ground-probe and ramp-recovery behaviors and is not an interchangeable controller. CS:GO/CS2 movement and hull dimensions were not substituted.

Coordinates remain Source units: X/Y horizontal, Z up; origin at the feet; yaw 0 along +X, 90 along +Y. Only the renderer converts coordinates.

## Profile

| Setting | Value / behavior | Evidence |
|---|---|---|
| Gravity | 800 | Supported by native KSF ballistic velocity and displacement steps. |
| Air acceleration | 150 | Verified in Boreas's compiled `logic_auto`; native air steps support the chosen formula. |
| Ground acceleration / friction / stopspeed | 5 / 4 / 75 | CSS-derived reference; independently matches 65 recorded ground/jump transitions. |
| Held command magnitude | ±400 per axis | Shared CSTRIKE input branch; diagonals crop to max wish speed. Native initial keydown may be fractional. |
| Maximum wish speed | 260 | CSS-derived normal surf profile, supported by ground and air telemetry; not a cap on momentum. |
| Air projection cap | 30 | CSS-specific RNGFix; acceleration term retains uncapped wish speed. |
| Velocity limit | ±5000 per component | 5000 verified in compiled Boreas; per-axis semantics from movement references. No total-vector clamp. |
| Standing hull | (-16,-16,0) to (16,16,62) | CSS-specific RNGFix branch. |
| Crouched hull | (-16,-16,0) to (16,16,45) | CSS-specific branch; ±8.5 airborne origin transition. |
| Standing / duck eye | 64 / 47 | CSS-derived view vectors; eyes intentionally exceed hull height. |
| Jump impulse | float32(sqrt(2×800×57)) = 301.9933776855469 | CSS-specific predictor and measured first crouch jump. |
| Jump order | Standing adds impulse after initial half gravity; ducking sets impulse. Jump adds its own half-gravity step. | CSS-specific predictor; native crouch-jump fixture. |
| Step / ground probe | 18 / 2 | Shared movement and CSS-specific predictor. |
| Ground classification | Normal Z ≥ .7; reject if upward velocity >140 | Source/CSS reference and boundary fixtures. |
| Duck speed / transition | .34 command scale; .4 s ground duck, .2 s unduck; immediate air hull transition | CSS-derived reference, telemetry supports tested transitions. Spam/reversal timing remains simplified. |
| Surface friction | Ordinary 1; unsupported slow rise .25; ground surface factor capped at 1 | Source categorization; native air fixtures confirm the .25 transition. Ramp PHY material metadata is retained; full CSS surface-property lookup remains unresolved. |

Primary mechanics: [Valve shared movement](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/src/game/shared/gamemovement.cpp), [CSS-specific RNGFix predictor](https://github.com/jason-e/rngfix/blob/9831d25e9f6747566a6adc72d75ae3fc671a656c/plugin/scripting/rngfix.sp), [CSS-derived mode constants](https://github.com/momentum-mod/game/blob/9da88b97769e0f2306623946ebbcb5d0f919a1f0/mp/src/game/shared/momentum/mom_system_gamemode.cpp), [input generation](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/src/game/client/in_main.cpp).

## Order and collision

Tick order: input cropping/ducking; StartGravity; jump; grounded friction; acceleration; swept movement/step handling; CategorizePosition; FinishGravity; grounded Z clearing. Four movement bumps consume remaining time; they do not create extra acceleration or gravity ticks. Multiple planes clip velocity and may constrain motion to a crease. StepMove compares lower and up-forward-down paths. No steering, ramp attraction or arbitrary speed preservation is used.

Collision uses the player's swept axis-aligned hull. The real BSP supplies compiled brush planes and bevels. VPHY files supply original convex ramp decompositions, converted from IVP metres and transformed by authored prop matrices. Displacements use the actual decoded triangles and flags. A stable-order BVH reduces candidate queries without changing narrowphase order.

BSP collision rejects sweeps that remain outside one plane. Its 1/32-unit contact margin backs up an actual crossing. VPhysics skin handling differs: shallow approaches within the margin are allowed, but a real convex exit inside the finite sweep must not be preceded by a padding-created corner intersection. Actual KSF seam/departure fixtures distinguish these cases. This is an independently implemented collision contract supported by measured behavior, not a copy of proprietary VPhysics. Remaining native precision/contact details are reported by the full comparison.

## KSF and map rules

**Current browser/ranked default (3 October 2026):** hold-jump auto-bhop with capped starting speed (`css-surf-capped-1`). Unrestricted starts remain an explicit unranked local option; the former open-start profile is retained for old replay playback. These settings are independently versioned in personal-best/replay keys and do not change gravity, air acceleration, ground friction or the surf clipping formula. Stamina and vanilla bunnyhop speed penalties are omitted as a surf-profile choice; a live KSF manifest is still unavailable.

The current ranked rule applies the existing end-tick start-exit XY clamp: 325 u/s if grounded, 350 if airborne. It preserves vertical velocity and XY direction and never increases sub-cap speed. Jumping in the start zone remains available. The complete exit tick is displaced before the clamp; a prespeed approach can therefore affect the fractional exit tick, rather than being capped continuously inside the zone. Subsequent surfing has no such horizontal cap.

**Evidence boundary:** the public Boreas telemetry verifies a falling-start 350 clamp despite an earlier crouch jump. A real-trigger one-step test against native frames124→125 gives zero position error and 0.0000432 u/s velocity error within predeclared .002/.002 tolerances. The [2013 KSF announcement](https://steamcommunity.com/groups/SurfTimerUpdates/announcements/detail/1513501526513859534) instead describes 325 for ordinary zones, 350 for falling-start zones, 270 after prehopping and a four-prehop limit. It does not say that every airborne player gets 350. Our grounded/airborne fallback across the three maps is a documented **Surfd ranked rule**, not established universal current KSF behavior. No blanket start-zone jump ban is claimed.

**Reference option:** manual jumping plus observed Boreas falling-start cap. This recording contains a prestart crouch jump, followed by an end-of-tick horizontal clamp to **350 u/s** on start exit. The older 2013 KSF announcement's 270 prehop / four-hop rules therefore cannot be generalized to this present Boreas case. Grounded 325 remains a historically supported fallback, not newly measured here. [KSF historical announcement](https://steamcommunity.com/groups/SurfTimerUpdates/announcements/detail/1513501526513859534), [KSF commands](https://ksf.surf/commands).

Boreas itself issues `sv_airaccelerate 150`, `sv_maxvelocity 5000` and `sv_enablebunnyhopping 1`. The last setting removes a vanilla restriction; it does not by itself mean global hold-jump automation. Actual KSF server overrides remain possible. See [import evidence](BOREAS-IMPORT-RESEARCH.md).

The map's original no-jump box uses `player_speedmod 0.9999`, suppresses jump, and scales **movement frametime** by .9999. The authoritative timer still advances by one 15 ms tick. Immediate exit restoration is implemented; the map's additional .03/.06-second repeated restores have no separate effect in this static trigger flow. Native recorded gravity steps independently show the tiny scale. [Valve speed modifier entity](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/src/game/server/player.cpp), [ProcessMovement](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/src/game/shared/gamemovement.cpp).

An evidenced **neutral uphill landing fix** is enabled: for a descending/slow-rising approach to a walkable nonflat incline, moving uphill, where clipping would not increase horizontal speed, movement ends at the first contact plus .1 Z, retains incoming XY, and categorizes ground. This matches native Boreas tick 2756 and the conditional RNGFix PreventCollision behavior. It never applies to steep surf faces. Other RNGFix/MomSurfFix corrections are not assumed installed or reproduced wholesale. [RNGFix primary implementation](https://github.com/jason-e/rngfix/blob/9831d25e9f6747566a6adc72d75ae3fc671a656c/plugin/scripting/rngfix.sp), [MomSurfFix](https://github.com/GAMMACASE/MomSurfFix/tree/2dda7ae7e2e1dc9da2a43fcaca642f6200d8401e).

## Additional classic-map profiles

Utopia NJV and Mesa Fixed retain the same 15 ms movement core, gravity and air acceleration. Their public KSF recordings support a **3500 u/s per-component** velocity cap; this is an inferred server profile, exported as an explicit map override, not an authored BSP command. Boreas retains its established 5000 profile. Source's limit is not a total-vector speed clamp.

Mesa's authored continuous push contributes base velocity during movement and the Source exit carry when the player leaves. This is a real map entity, not an arbitrary boost added to make a route work. Fifteen native recorded push transitions independently verify the implemented behavior; see [push reference](MAP-PUSH.md).

Stock installed CSS build 11003710 directly confirmed the 62/45-unit standing/crouched hulls and full 0-based trigger bounds. It also reproduced several reset contacts that KSF recordings pass through. The imported authored resets are retained; no unsupported hull shrink is applied. Exact KSF server/revision differences remain unresolved. See [native probe](NATIVE-CSS-PROBE.md), [map provenance](CLASSIC-MAPS.md), and [comparison results](VALIDATION.md).

## Mouse and camera

Mouse events update view immediately: `degrees = counts × .022 × sensitivity`, no frame-time factor or smoothing. Raw Pointer Lock is requested, with adjusted-input fallback. Pitch is ±89°. Device/browser raw counts need not equal native CSS counts on every system. Source FOV90 converts to vertical73.739795°, giving horizontal106.260205° at16:9. No banking or speed-driven FOV is added. Eye position follows the hull/duck state; default positional interpolation is off. Optional interpolation adds a tick of positional delay.

[Valve mouse path](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/src/game/client/in_mouse.cpp), [FOV conversion](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/src/game/client/view.cpp).

The browser samples held keyboard inputs at full400 immediately. Source's client-frame `KeyState` can generate fractional initial/released commands. The native replay lacks analog command magnitudes; its first forward press is reconstructed as200 from independent velocity evidence. This remains an explicit input-generation difference.

## Precision, validation and limits

State and selected intermediates use float32; JavaScript trigonometry, plane construction and some trace arithmetic remain double. The native replay contains positions/velocities/buttons/angles but no contact flags, hull-transition timers, build ID or plugin manifest. Full-course comparisons report their actual errors against predeclared tolerances rather than equating determinism with native parity. See [validation](VALIDATION.md) and [independent report](REVISION-VALIDATION.md).

Unresolved beyond the tested run: exact native build/plugins, some VPhysics/displacement edge ordering, tiny float/trace residuals, complete duck-spam behavior, native client prediction/step camera, fractional keyboard command generation, exact KSF timer internals, all map-entity dynamics, water/ladder movement and combat modifiers. No experienced human CSS playtest is claimed.

## Licences and provenance

The default course now uses the actual CSS BSP, not the earlier original map. Assets retain their authors' rights; no general redistribution licence was established. They were imported for this requested local game. The code is independently written from behavioral/file-format references. Valve's SDK licence is Source-specific; RNGFix and MomSurfFix are GPL; their implementations are not copied into this project. See [notices](../THIRD_PARTY_NOTICES.md), [Valve licence](https://github.com/ValveSoftware/source-sdk-2013/blob/b8cfb12c0e083a2ef5b2f9f9b50f3902fa034474/LICENSE), [RNGFix licence](https://github.com/jason-e/rngfix/blob/9831d25e9f6747566a6adc72d75ae3fc671a656c/LICENSE).
