Public: anyone can read this; the crew can change it.
forked from trevato/cs · proposes · 4 behind
The solver moves behind the door: src/engine/physics.ts, and Counter-Strike's numbers become src/client/movement.ts #140
Check · Review · Land · Live done — Landed and live in production.
Pushed. `bun test` is green: 619 tests across 66 files in 9.5–11.3 s, and the two files that hold the golden digests — `src/client/replay.test.ts` and `src/range/pin.ts` — are untouched, so both games' pins hold to the byte.
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
Pushed.
bun testis green: 619 tests across 66 files in 9.5–11.3 s, and the two files that hold the golden digests —src/client/replay.test.tsandsrc/range/pin.ts— are untouched, so both games' pins hold to the byte.---
src/client/physics.tsis nowsrc/engine/physics.ts, and the diff is what the issue asked for: a rename, two import lines and a docstring. Git reads it at 84% similarity, and the only code that left isMOVE,HULLandfallDamage.Body,Wish,MoveTuning,Hull,accelerate,airAccelerate,move,groundUnder,stuck,eyeHeightandhullHeightare behind the door;Boxnow comes from the engine's owntrace.ts, so the solver names no game's level module; and the module imports./math.tsand./trace.tsand does nothing at import time, so the door is as cheap as before.Counter-Strike's numbers stayed in the game as
src/client/movement.ts:CS_MOVE,CS_HULL,fallDamage— a curve this game chose rather than a consequence of the arithmetic — and nothing else.physics.test.tsbecamemovement.test.tswith every assertion it had, including the second-tuning half that runs the same functions on half the gravity and a hull twice the size. The callers changed by an import line each:world.ts,scene.ts,combat.ts,observe.ts,models.ts,hud.tsand the two tests that read the hull.src/engine/index.tsgains the physics paragraph and the eleven names;boundary.test.tsgains them in its pinnedSURFACEand as a group in the comment above it;GUIDE.mdgains the section thatguide.test.tsdemands of anything behind the door — what a game brings, that nothing has a default, and that fall damage is on the other side of the door on purpose. No rule was loosened anywhere:purity.test.tsandsrc/independence.test.tspass as written, and the two fixtures that named./physics.tsfromsrc/client/now name./movement.tsbecause that is the file that exists.Sizes, measured on the bundles this branch commits: app 72,132 raw / 33,552 gzipped (from 72,128 / 33,546), range 28,980 / 12,323 (from 28,978 / 12,319), example 8,754 / 4,228 (raw unchanged to the byte). Four bytes on the shooter is the rename; the other games gained a handful because the minifier hands out different short names over a module graph that changed shape, as in #106, #107 and #110. All three ceilings held, none moved. That the range and the example ship none of the solver is a test rather than an inference:
src/range/bundle.test.tsreads the committed file forairSpeedCap,duckRate,jumpVelocityandstopSpeedand finds none, whilesrc/client/bundle.test.tsfinds all four and the jump velocity itself.Two things I changed beyond the file list, both because the move made them false: the range's page said "the eye stands at the firing line until the engine's physics lands" and a comment in
src/range/main.tssaid the same — the mover has landed, and what is missing is a tuning of the range's own, which is what they say now. What I chose not to do: give the range aMoveTuning(that is a different pull), and add a test undersrc/engine/duplicating the solver's behaviour — the assertions live with the numbers they are about, in the game, exactly as the issue asks.To try it in the preview:
/plays as before, jump-and-strafe feels identical, crouching under the crates still refuses to stand up, and/rangeis unchanged.src/engine/GUIDE.mdis the page to read for the new paragraph.🤖 Generated with Claude Code
Closes #123