Split The code is public; the app answers only to the crew.
Movement between ticks: interpolate what is drawn, so 64 Hz does not judder at 60 #128
Check · Review · Land · Live done — Landed and live in production.
The work is pushed and bun run check is green (520 tests, types clean).
shipped merged
Sign in to join this conversation.
new above
offline
The work is pushed and
bun run checkis green (520 tests, types clean).A new
src/client/interpolate.tsdoes the arithmetic of drawing between two ticks — a position lerped, a yaw turned the short way round the circle (−170° to +170° is 20° through south, not 340°),alphaclamped to [0, 1], a teleport that snaps, anddrawnAt, the clock an animation measured offworld.timeshould advance on. It is pure and writes into the tuples it is handed, so a frame allocates nothing.Interpolated: every other player's position and yaw, the muzzle flash on their gun (so the star stays on the barrel of the body that was drawn), every grenade's position, the bomb's, the dead toppling (a corpse never moves, so what judders is its fall clock), and the HUD's name plates, which take the same
alphathe scene did. Left at the newest tick: the camera — your aim is this frame's mouse and your eye is the newest position, and that includes the teammate's eyes you borrow while dead — plus every effect's timing (tracers, sparks, your own gun's flash and bob), the radar, the crosshair and the whole HUD besides the plates.The previous pose lives in fields that already exist:
player.prev,bomb.prev,grenade.prev, written once at the top ofupdate(and bygrenades.step, the code that moves a grenade) — never a fresh object.startRoundresets it, because a spawn is a teleport, and anything further than 64 units in one tick snaps anyway. The RL arena steps players throughapplyInputand never throughupdate, so it pays nothing at all for this;observe.tsand the policy's 32 numbers are untouched.scripts/cost.tsreads 0.12–0.13 ms a tick either side of the change, inside the run-to-run spread.What to look at in the preview: stand in a doorway and watch a bot strafe across it. Before, at 60 Hz against 64, it advanced two ticks or none every fifteenth frame and crossing the crosshair was a series of small jumps; now it slides. Then check what this must not have broken — flick your own view and confirm the aim is immediate, and watch a round end and restart: nobody slides to their spawn. Tests that would fail without the change are in
interpolate.test.ts(including the seam and the snap),renderer.test.ts(the model matrix at alpha 0, 0.5 and 1, a teleport drawn where the body is, a grenade, a topple),world.test.tsandgrenades.test.ts(where the previous pose is written, and thatapplyInputdoes not write it) andhud.test.ts(the plate over the interpolated head).🤖 Generated with Claude Code
Closes #100