32 · Animation · 2D (and 3D flipbooks)

Sprite sheet animation

Flipbook animation that plays at the same speed everywhere.

A sprite sheet is a strip of frames, and animating it means showing the right frame at the right time. Advancing one frame per screen refresh makes a walk cycle twice as fast on 120 Hz. Timing frames in seconds, flipping the sprite for direction and switching animation only when the state changes fixes the usual bugs.

←→ moveA animation on/off · 123 4 / 10 / 16 fps◀ ▶ to walk

Try this: Walk left and right. With one frame the hero slides like a statue. Turn animation on and the legs cycle through the sheet. Try 4 fps (choppy) and 16 fps.

One frame: the hero glides with frozen legs. Turn animation on.

Prompt bit

Works for 2D or 3D in any engine (Unity, Unreal, Godot, web). Paste the short one for a quick fix, or the detailed one when you want it done properly.

Animate sprite sheets by time: each animation has frames and a frame duration (default 0.1 s), advance with accumulated delta time, flip horizontally for facing, and restart only when the animation changes, not every frame you call play.

38 words · one sentence to paste as is

Where it's used

Common mistakes

Advancing one frame per refresh (speed changes with the monitor), calling play every frame so the animation restarts and freezes on frame 1, flipping around the sprite corner instead of its centre, and blurry filtering on pixel art.

Writing this with an AI assistant? See our best AI coding assistants for game developers.

Missing a concept? Request one.

Related concepts

New concepts, in your inbox.

One short email when we add new concepts, plus our weekly roundup of AI tools for game devs. Unsubscribe any time.