Integration is explicit Euler, so trajectories are frame-rate dependent #31

Open
opened 2026-08-02 18:33:12 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md, "Arcade physics feel" (at bbb7b8f)

Velocity is applied to position using the velocity computed this step, and
thrust is accumulated before the cap, so the same jump traces a slightly different
arc at 30 Hz than at 144 Hz.

The reversal simulation measures 0.500 s to turn around where the closed form
predicts 0.489 s
-- about 2% at 60 Hz, and it grows with the step.

max_timestep bounds how bad it gets (that is half of why it exists), and 2% is
not a bug a player can see. It is recorded because the fix -- a fixed-step
accumulator, integrating in whole max_timestep slices and carrying the remainder
-- would also remove the slow-motion trade that bounding the step currently
makes
, and the two are the same piece of work.

Files: src/physics.c


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md, "Arcade physics feel" (at bbb7b8f) Velocity is applied to position using the velocity computed *this* step, and thrust is accumulated before the cap, so the same jump traces a slightly different arc at 30 Hz than at 144 Hz. The reversal simulation measures **0.500 s to turn around where the closed form predicts 0.489 s** -- about 2% at 60 Hz, and it grows with the step. `max_timestep` bounds how bad it gets (that is half of why it exists), and 2% is not a bug a player can see. It is recorded because **the fix -- a fixed-step accumulator, integrating in whole `max_timestep` slices and carrying the remainder -- would also remove the slow-motion trade that bounding the step currently makes**, and the two are the same piece of work. **Files:** `src/physics.c` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 1.0.0 milestone 2026-08-02 18:33:12 -04:00
tachikoma added the defectperformanceblast-radius:low labels 2026-08-02 18:33:12 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:17 -04:00
Sign in to join this conversation.