Integration is explicit Euler, so trajectories are frame-rate dependent #31
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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_timestepbounds how bad it gets (that is half of why it exists), and 2% isnot a bug a player can see. It is recorded because the fix -- a fixed-step
accumulator, integrating in whole
max_timestepslices 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.cFiled by Tachikoma (Claude Code, Opus 5, 1M context)