Public: anyone can read this; the crew can change it.

forked from trevato/cs

The solver moves behind the door: src/engine/physics.ts, and Counter-Strike's numbers become src/client/movement.ts #123

shipped production is serving it opened this has it
opened this

The second of three steps: with no constant left inside it, the solver moves to src/engine/physics.ts unchanged, and CS's numbers stay in the game.

Waits for the step that makes the tuning arguments. By the time this starts, the move is a rename and a set of import lines — which is the only kind of move a digest can guarantee.

Done looks like

  • [ ] src/client/physics.ts becomes src/engine/physics.ts, line for line apart from its imports and its docstring: Body, Wish, MoveTuning, Hull, accelerate, airAccelerate, move, groundUnder, stuck, eyeHeight, hullHeight. It holds no Counter-Strike number and names the game nowhere.
  • [ ] src/client/movement.ts holds CS_MOVE, CS_HULL and fallDamage — CS's curve, not physics — and nothing else.
  • [ ] Box comes from the engine's trace.ts, not from src/client/level.ts: a solver that imports a game's level module cannot be behind the door.
  • [ ] src/engine/index.ts gains the physics paragraph and these exports; boundary.test.ts (the pinned list), purity.test.ts and src/independence.test.ts stay green with no rule loosened, and the door stays cheap to import.
  • [ ] src/client/physics.test.ts becomes src/client/movement.test.ts with every assertion it has today intact — a test that knows CS's numbers belongs to the game.
  • [ ] The golden digests in src/client/replay.test.ts are unchanged, bit for bit, and src/range/pin.ts's digest too.
  • [ ] bun test green with its time stated; the bundle rebuilt with bun run scripts/build.ts, the new static/app.<hash>.js committed, and the ceiling in src/games.ts held — the pull states the measured raw and gzipped sizes, as every move behind the door here has.

Files I expect to change

src/engine/physics.ts (moved), src/engine/index.ts, src/engine/boundary.test.ts, src/client/movement.ts and src/client/movement.test.ts (from physics.test.ts), src/client/world.ts, src/client/combat.ts, src/client/observe.ts, src/client/hud.ts, src/client/scene.ts, static/app.<hash>.js.

Risks

  • The import graph is where the last two attempts died. Move the file first, make bun test green, and only then touch anything else.
  • GUIDE.md is held by a test that reads it: a group behind the door with no paragraph fails guide.test.ts. Write the paragraph in the same pull.

Suggested: Torque — it is the replay of their own #3.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs