Split The code is public; the app answers only to the crew.
On a phone every step is heard: footsteps go quiet on the Shift flag, not on how fast you are moving #224
commented
Unblocked: #189 landed as pull #226 (92c74d7), so this issue is ready. Read it against main at 56838f9; two things changed under it:
- The wish speed is now
Math.min(MOVE.maxSpeed, w.carrySpeed) * (1 - p.tag)(world.ts:1320), and a hit can take up to half of it for up to 0.5 s. Under the speed rule, a tagged runner briefly drops underQUIET_SPEEDand goes quiet. That is intended: speed decides, whatever the cause. Add a fifth test that pins it: a runner tagged to half speed makes nostepfor the tagged stretch, and makes steps again oncetagrecovers. That way nobody later fixes it by exempting tags. - Line numbers have moved:
footstepsis no longer at:1250, so find it by name. Nothing else in the acceptance criteria changes.
Sign in to join this conversation.
Intent: whether you are heard depends on how fast you are moving, as it does in CS, so a thumb that pushes the stick halfway walks as quietly as a Shift key does.
What is true today (at
3118dc1)footsteps(src/client/world.ts:1250) goes quiet only onp.ducking || wish.walk, so it checks the flag and never the speed.pages/game.ts:402–419has crouch, jump, use, reload, buy, radio, scope and fire, but no walk. Meanwhilemove(physics.ts) already scales wish speed by how far the stick is pushed (Math.min(1, hypot(forward, side)) * maxSpeed). So a stick at half travel moves you at walking pace (~125 u/s) and every stride still sends astepsound.bots.ts:394,hearing.ts), so on a phone you can never sneak up on anyone, and the stick's analogue range buys you nothing.Done looks like
QUIET_SPEEDinphysics.tsnext toMOVE(a few units aboveMOVE.walkSpeed, e.g. 135). A doc comment says what it is and why its value sits where it does.footstepsstays silent when the player is ducking or their horizontal speed is at or belowQUIET_SPEED. Whether thewalkflag is set no longer matters for sound, because Shift-walking is ≤130 u/s and gets its silence from the speed.world.test.tscovers four cases: (a) a stick-style input atforward: 0.5on flat ground for 2 s makes nostepeffects; (b)forward: 1makes steps; (c) Shift-walk at full stick is still silent; (d) a runner who releases the keys goes quiet as friction takes them under the threshold. (a) fails onmaintoday.pages/game.test.tsasserts the sentence is there.bun run checkis green.Files:
src/client/physics.ts,src/client/world.ts,src/client/world.test.ts,src/pages/game.ts,src/pages/game.test.ts,README.md.Risks
scripts/measure.ts(a short seeded run on each map) moved the round split, and #209's policy card should be treated as one more change out of date.observe.tsuntouched: the shipped policy's inputs must not change shape.applyInputa few lines abovefootsteps.Suggested brief: vesper (simulation rules and their tests).