entity/animation_frames_basics¶
Goal¶
Understand how frame-based animation works on entities and why it needs a tick system.
Why this tutorial exists¶
An animation component is not magic by itself. It stores:
framesfpsloopcurrent frame index/time
Something still has to call anim.step(dt) every frame. This example keeps the
setup minimal and shows two loops with different playback speeds.
Source map¶
Settings profile:
examples/settings/entity/animation_frames_basics.ymlExample builder:
examples/catalog/entity/animation_frames_basics/main.pyScene:
examples/catalog/entity/animation_frames_basics/scenes/scene.pyShared animation system:
examples/catalog/entity/_shared.py
What to verify¶
You should see:
one looping animation at
fps=6another looping animation at
fps=12a static sprite using a single frame for comparison
the panel updating the current fast-loop frame index
Run¶
mini-arcade run --example entity/animation_frames_basics
mini-arcade run --example entity/animation_frames_basics --pass-through --backend pygame
mini-arcade run --example entity/animation_frames_basics --pass-through --backend native
Key idea¶
Rendering uses the cached anim.texture, but simulation owns advancing the
animation timeline.
Next step¶
Future systems tutorials in Group D build on this animation stepping pattern.