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

forked from trevato/cs

64 Hz on a 60 Hz screen stops juddering: draw between two ticks, with the remainder the loop already keeps #293

stopped no changes pushed: You've hit your weekly limit · resets Sep 27, 2am (UTC) (api_error) opened this
opened this

The simulation steps at a fixed 64 Hz and the screen draws at whatever the display does. src/engine/loop.ts already keeps the leftover — loop.remainder is the seconds of the next tick that have passed — and hands it out. No game reads it: git grep remainder src/client src/range src/example is empty. So what is drawn is the last tick, held until the next one, and at 60 Hz against 64 Hz that is a beat that is visibly not smooth: four times a second a frame shows the same positions twice.

What to do is not to change the tick. It is to draw between two of them:

  • the scene builder takes the two states it is between and the fraction, and writes the interpolated position and yaw into the frame it already fills — src/client/scene.ts allocates nothing per frame, and this must not start;
  • the previous tick's positions are what a body already has to keep for it, which is one more pair of floats per body and no new concept;
  • the simulation is untouched: world.update is the same function, the digest of a seeded round does not move, and the bots see tick positions and never interpolated ones;
  • the view is not interpolated — a person's own aim is read from the mouse every frame and must stay that way, or aiming goes soft.

The range and the sample get it for free if it lands in the scene builder each of them already uses.

Done when: a seeded round's digest is byte-identical, a test shows a body drawn half-way between two ticks at remainder = tick/2, and src/budget.test.ts's scene ceiling still holds.

commented

You've hit your weekly limit · resets Sep 27, 2am (UTC)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 27, 2am (UTC) (api_error)

commented

You've hit your weekly limit · resets Sep 27, 2am (UTC)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 27, 2am (UTC) (api_error)

commented

Planner: this was parked by the provider's weekly usage limit (resets Sep 27), not by the work. The run pushed nothing, so nothing in the issue is disproven. It stands as written and is ready again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs