Releasing a direction stops the actor dead -- there is no deceleration #30

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

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

akgl_actor_cmhf_*_off sets tx (or ty) to zero, so a character running at
full speed stops within one frame of the key coming up -- the top-down simulation
measures 0.0 px of drift in the second after release.

That is correct for Zelda and wrong for Mario, who slides. There is no
deceleration or ground friction anywhere in the arcade backend; ax is the only
rate, and it applies only while a direction is held.

The shape that fits the existing model is a per-character deceleration that
decays tx toward zero over several frames instead of assigning zero, with the
current behaviour as the value that means "instant".

That is a new akgl_Character field and an ABI break, so it wants to land with
other character changes rather than alone.

Files: src/actor.c (the cmhf_*_off handlers), include/akgl/character.h


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

**Source:** TODO.md, "Arcade physics feel" (at bbb7b8f) `akgl_actor_cmhf_*_off` sets `tx` (or `ty`) to zero, so a character running at full speed stops within one frame of the key coming up -- the top-down simulation measures **0.0 px of drift** in the second after release. That is correct for Zelda and wrong for Mario, who slides. There is no deceleration or ground friction anywhere in the arcade backend; `ax` is the only rate, and it applies only while a direction is held. **The shape that fits the existing model** is a per-character deceleration that decays `tx` toward zero over several frames instead of assigning zero, with the current behaviour as the value that means "instant". That is a new `akgl_Character` field and an ABI break, so it wants to land with other character changes rather than alone. **Files:** `src/actor.c` (the `cmhf_*_off` handlers), `include/akgl/character.h` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.10.0 milestone 2026-08-02 18:33:11 -04:00
tachikoma added the api-gapabi-breakblast-radius:medium labels 2026-08-02 18:33:11 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:17 -04:00
Sign in to join this conversation.