Skip to content

[11/11] test(player): the locomotion transitions as GIFs - #231

Merged
arudaev merged 1 commit into
mainfrom
playtest/11-transition-gifs
Oct 25, 2026
Merged

arudaev merged 1 commit into
mainfrom
playtest/11-transition-gifs

Conversation

@arudaev

@arudaev arudaev commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Stack: 11 of 11 (playtest): #212–#229 are merged, so this PR now targets main. Merge only on Alexander's word.

What and why

#156, "smooth transitions": a GIF of each locomotion transition, made by the game's own code, not by hand.

  • game/verification/transitions/trace.ts runs movement.ts, jump.ts and animation.ts the way player.ts wires them: flat ground at the 120 Hz step, with the hero atlases' own anims.json. It prints which frame shows at each step and where the body is.
  • scripts/transition_gifs.py draws each trace at 30 fps and 2x, with the camera on the hero. The ground ticks are one foot apart and scroll with the world, so a sliding foot shows against them. Each frame is labelled with the clip frame and the pose the body asked for.
  • docs/09, "Smooth, not rubbery" gains step 7: how to run the check and what to look for.

The transitions

idle → walk → idle
walk → run → walk → run
idle → run → idle
idle → jump → land
run → jump → land → run

Holding the stick for 0.4 s starts the run, so after a run the body slows to a walk and then runs again. That's why the second GIF ends in a run.

Pops, measured

Every clip switch lands on a contact frame and goes through the bridge clips (idle-walk, walk-run, run-start). To check for pops, I compared how far the sprite's outline moves at each clip switch with how far it moves between frames inside a cycle:

  • Largest switch: run-07 → walk-run-01 moves the outline 9 px across and the feet 14 px. run-07 is the run's flight frame; the run's own loop, run-07 → run-00, moves 12 px both ways.
  • Every other switch: at most 8 px across and 4 px at the feet, which is within the walk cycle's own steps (up to 8 px).

No switch moves the outline more than the cycle's own frame-to-frame step.

Issue

Refs #156. With this PR the "smooth transitions" criterion is met. The walk and run speeds measured from the strides are already in main (2.2 and 4.6 m/s, f59fccf). Still open in #156: the 2-minute recorded keyboard + pad playtest.

Verification

  • python scripts/transition_gifs.py writes all five GIFs (1.9 MB together).
  • pytest scripts/test_transition_gifs.py: 3 passed (the 30 fps sampling and where a frame is drawn).
  • tsc and check_docs.py are clean.

…code

trace.ts runs movement.ts, jump.ts and animation.ts as player.ts wires them
(flat ground, 120 Hz) through idle-walk-idle, walk-run-walk-run,
idle-run-idle, idle-jump-land and run-jump-land-run; transition_gifs.py
draws each at 30 fps with ground ticks that move with the world. Every clip
switch moves the outline no more than the cycle's own frame step (#156).
@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
wincs Ready Ready Preview Oct 25, 2026 11:58am UTC

Request Review

@github-actions github-actions Bot added area:pipeline Rerunnable art and export scripts area:docs Design docs, README, contributor guides labels Oct 25, 2026
@arudaev
arudaev changed the base branch from playtest/10-ram-timing to main October 25, 2026 12:00
@arudaev
arudaev merged commit f770c89 into main Oct 25, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Design docs, README, contributor guides area:pipeline Rerunnable art and export scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant