2D Walk Cycle Sprite Sheets: Frame Counts, Sizes and How to Generate a Consistent One with AI
How many frames a 2D walk cycle needs, which sizes and fps to use, strip vs grid layouts, and how to slice the sheet in Godot, Unity and Phaser.
A 2D walk cycle usually has 4, 6 or 8 frames: 4 reads as retro, 6 is a good default for 16x16 and 32x32 characters, and 8 gives smooth motion at 32x32 and above. Play it at 8 to 12 frames per second, keep every frame the same cell size with the feet on one baseline, and export one horizontal strip per animation so any engine can slice it by frame width.
This guide covers frame counts for idle, walk, run and attack, how to pick sizes and fps, strip versus grid layouts, slicing in Godot, Unity and Phaser, and how to generate a set that stays consistent.
How many frames per animation
| Animation | Typical frames | Typical fps | Loops | What the frames carry |
|---|---|---|---|---|
| Idle | 2 to 6 | 4 to 8 | Yes | Breathing, a blink, a cloak or tail moving |
| Walk | 4, 6 or 8 | 8 to 12 | Yes | Two steps: contact, down, passing and up for each foot |
| Run | 6 to 8 | 10 to 14 | Yes | Longer stride, forward lean, a frame with both feet off the ground |
| Attack | 4 to 8 | 10 to 15 | No | Anticipation, strike, follow through, recovery |
| Hurt | 2 to 3 | 8 to 12 | No | Recoil and return |
| Death | 4 to 8 | 8 to 12 | No, hold last frame | Collapse and settle |
These ranges are working conventions, and your game's feel decides the final numbers. A heavy knight wants fewer, held frames; a nimble rogue wants more.
The walk cycle in 8 frames
A full cycle is two steps, one per foot. With 8 frames, each step gets four poses:
- Contact: front heel touches the ground, legs at their widest.
- Down: weight lands, the body drops one or two pixels.
- Passing: the back leg swings past the standing leg.
- Up: the body rises as the standing leg pushes off.
Frames 5 to 8 repeat the same poses with the other foot. Arms swing opposite to legs. With 6 frames you drop one pose per step (usually down), and with 4 frames you keep contact and passing only.
Sizes and timing
Frame size follows your game's sprite resolution. Common choices are 16x16, 32x32 and 64x64; tall characters often use a taller cell such as 16x32 or 32x48 so the head and feet both fit. Pick the cell first, then draw the character inside it with a little transparent margin for arm swing and weapons.
Timing is simple math. Cycle duration is frames divided by fps: 8 frames at 12 fps is about 0.67 seconds per cycle, which is two steps. If the character moves faster than the stride the animation shows, the feet slide. Fix it by matching movement speed to stride:
movement speed (px/s) = distance covered per cycle (px) / cycle duration (s)
example: 2 steps x 12 px stride = 24 px per cycle
24 px / 0.67 s = about 36 px/s
Strip or grid
| Layout | Shape | Where it fits |
|---|---|---|
| Horizontal strip | One row, one animation, frame width x frame count wide | Every engine; GameMaker's strip import; simplest to slice |
| Grid by direction | One row per direction, same frames per row | Top-down RPG formats such as RPG Maker or Stardew NPC sheets |
| Vertical strip | One column of frames | Engines that read frames top to bottom, such as Terraria NPCs |
| Packed atlas plus JSON | Frames placed anywhere, coordinates in a data file | Many animations in one texture; Phaser and Unity importers |
Keep the strip as your source of truth. A strip converts to any of the other layouts without guessing, while a packed atlas needs its JSON to be read at all.
Directions
Side-scrollers usually need one facing, mirrored in the engine for the other side. Top-down games need four directions (down, left, right, up), and some need the four diagonals as well. Mirroring right into left saves work when the character is symmetric. A character with a sword in one hand or an eye patch needs a real left-facing animation, or the details swap sides when it turns.
Slice it in your engine
Godot 4
- Add an
AnimatedSprite2Dnode and create a newSpriteFramesresource. - In the SpriteFrames panel, add an animation called
walkand use the "Add frames from sprite sheet" button. - Pick the strip and set Horizontal to the frame count and Vertical to 1, then select all frames.
- Set the animation speed to your fps and enable loop.
- For pixel art, set the default texture filter to Nearest in Project Settings under Rendering, Textures.
The Godot 2D sprite animation tutorial walks through both the AnimatedSprite2D and the Sprite2D plus AnimationPlayer approaches.
Unity
- Select the PNG and set Texture Type to Sprite (2D and UI), Sprite Mode to Multiple, Filter Mode to Point (no filter) and Compression to None.
- Set Pixels Per Unit to one consistent value for every character in the project.
- Open the Sprite Editor, choose Slice, set Type to Grid By Cell Size and enter the frame size, for example 32x32. Set the pivot to Bottom so feet stay planted.
- Apply, then select the sliced frames and drag them into the scene to create an animation clip, and set its sample rate to your fps.
Unity documents the slice types and their Size, Offset and Padding fields in its automatic slicing manual page.
Phaser 3
preload() {
this.load.spritesheet('hero-walk', 'assets/hero_walk.png', {
frameWidth: 32,
frameHeight: 32
});
}
create() {
this.anims.create({
key: 'walk',
frames: this.anims.generateFrameNumbers('hero-walk', { start: 0, end: 7 }),
frameRate: 12,
repeat: -1
});
this.add.sprite(160, 120, 'hero-walk').play('walk');
}
Set pixelArt: true in the game config so Phaser renders with nearest neighbor filtering.
Generate a consistent walk cycle with AI
The hard part with AI animation is frame to frame consistency: the same character, the same size, the same feet position, every frame. Sprixen builds the animation from a base sprite you already approved, inside a project that locks style and resolution.
- Create a project with the art style, resolution and view angle of your game (side scroll for platformers, top down for RPGs).
- Generate and approve the base sprite. Each variant costs 2 credits; generate two or three and keep the one with the clearest silhouette.
- Request the walk animation. Choose 2 to 12 frames (8 is the default) and an fps (12 is the default). Set the direction for top-down characters, and set the archetype (humanoid biped, quadruped, winged, amorphous, serpentine) so the motion fits the body.
- Add weapon details if the character carries one: weapon hand, weapon type and shield. These hold the sword in the same hand across frames.
- Repeat per direction for top-down sets. Each animation costs 4 credits at standard quality or 8 at premium, so a four-direction walk set is 16 credits at standard.
- Export a character package. The package pads every animation to a shared cell, anchors frames at the bottom center, and writes one horizontal strip per animation plus a packed atlas and a manifest with frame counts, fps and loop flags. Engine targets include Godot, Unity, Phaser, GameMaker and RPG Maker MZ.
Checklist before you ship the cycle
- Every frame has identical dimensions.
- Feet touch the same baseline on contact frames.
- The body bobs by one or two pixels, never more.
- The last frame flows into the first without a pop.
- Arms swing opposite to legs.
- No background pixels or soft halos at the edges.
- Movement speed matches the stride, so the feet do not slide.
For engine-specific metadata such as atlas JSON and pivots, see the sprite sheet format guide for Godot, Unity and Phaser. To generate your character and its cycle in one style, start in the Sprixen generator.
FAQ
How many frames should a 2D walk cycle have?
Four frames is the retro minimum, six is a strong default for 16x16 and 32x32 sprites, and eight gives smooth motion at 32x32 and above. All three cover two steps, one per foot.
What fps should a sprite walk cycle play at?
Most pixel art walk cycles play at 8 to 12 frames per second. Eight frames at 12 fps gives a cycle of about 0.67 seconds, and the character's movement speed should match the stride shown in that time.
Should I use a horizontal strip or a grid?
Keep a horizontal strip per animation as the source, because every engine can slice it by frame width. Convert to a grid or vertical strip only when the target format requires it, such as RPG Maker or Terraria.
Can I mirror a right-facing walk cycle for the left side?
Yes, when the character is symmetric. If it holds a weapon in one hand or has asymmetric details, generate a real left-facing animation so the details stay on the correct side.
How much does an AI walk cycle cost in Sprixen?
The base sprite is 2 credits and each animation is 4 at standard quality or 8 at premium. A side-scroller hero with idle and walk is 10 credits; a four-direction top-down walk set is 18.
Generate sprites that actually match.
Style-locked sprite generation keeps every character, tile and animation in your project visually consistent. 6 free credits on signup, no credit card required.
Related Articles
Sprite Sheet Generator Guide: Godot, Unity and Phaser Formats
How to generate sprite sheets that import cleanly into Godot, Unity and Phaser, with frame geometry, atlas metadata, pivots, animation timing and export checks.
How to Make Custom Terraria Item and NPC Sprites with AI (tModLoader Guide)
Make Terraria mod sprites with AI: tModLoader texture naming, right-facing item art, vertical NPC sheets, frame counts and a full workflow.
Stardew Valley Mod Sprites with AI: Items, Portraits and NPC Sheets for Content Patcher
Make Stardew Valley mod art with AI: 16x32 NPC frames, 64x64 portraits, item sprite indexes and the Content Patcher Load and EditData setup.