A fall accelerates without limit: there is no terminal velocity #29

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

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

akgl_physics_arcade_gravity adds gravity_y * dt to ey every step and nothing
bounds it. sy caps thrust, deliberately -- it is the character's own top
speed, not a speed limit on the world -- so a fall accelerates without limit for
as long as it lasts. The jump simulation reaches 560 px/s in 0.7 s and would
keep going.

Found by tests/physics_sim.c, which runs the arcade backend as a game would.

Drag is the mechanism that already exists for this: physics.drag.y makes ey
approach gravity_y / drag_y instead of diverging. So the behaviour is reachable,
it just is not the default and is not documented as the way to get a terminal
velocity.

Either document it that way or add an explicit physics.terminal_velocity.
No ABI change if it is a property rather than a field.

Files: src/physics.c, include/akgl/physics.h


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

**Source:** TODO.md, "Arcade physics feel" (at bbb7b8f) `akgl_physics_arcade_gravity` adds `gravity_y * dt` to `ey` every step and nothing bounds it. `sy` caps *thrust*, deliberately -- it is the character's own top speed, not a speed limit on the world -- so a fall accelerates without limit for as long as it lasts. **The jump simulation reaches 560 px/s in 0.7 s and would keep going.** Found by `tests/physics_sim.c`, which runs the arcade backend as a game would. Drag is the mechanism that already exists for this: `physics.drag.y` makes `ey` approach `gravity_y / drag_y` instead of diverging. So the behaviour is reachable, it just is not the default and is not documented as the way to get a terminal velocity. **Either document it that way or add an explicit `physics.terminal_velocity`.** No ABI change if it is a property rather than a field. **Files:** `src/physics.c`, `include/akgl/physics.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.9.x milestone 2026-08-02 18:33:10 -04:00
tachikoma added the api-gapdocsblast-radius:medium labels 2026-08-02 18:33:10 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:17 -04:00
Sign in to join this conversation.