Gridwright Start for $1

Sprite Sheet Animation Preview: Play Your Sheet Online

Preview a sprite sheet animation online before it goes in your game: find the grid, set the fps, loop or ping-pong, and catch frames that wobble.

Sprite Animation Previewer at work
Sprite Animation Previewer at work: Your animation played, checked and lined up.

You bought a character pack, or an artist sent you a sheet, or you drew one yourself. Now you have a PNG with 24 tiny figures in a grid, and the only way to know if the walk looks right is to see it move. Putting it in the engine just to look takes a scene, a SpriteFrames resource, slicing and a guessed speed. Then the character jitters on every step, or races through the walk, or drops into its idle halfway through, and you are back in the image editor guessing which frame is wrong.

A preview should answer five questions before the sheet goes near your game: where the grid is, which frames belong together, how fast they play, how they loop, and whether every frame stands in the same place. Below are all five on a real sheet, then the same checks in Godot 4.7.2 and in a browser tool.

The example is the adventurer from our Top-Down Characters pack: a 96 x 64 PNG with 6 columns and 4 rows of 16 x 16 frames, one row per direction.

1. Find the grid

The cell size is the sheet's width divided by the columns, and its height divided by the rows: 96 / 6 = 16 and 64 / 4 = 16. A wrong guess shows the moment it plays. A cell that is too big holds parts of two figures; one too small cuts the character in half or makes it slide across the box.

Side-View Characters
Side-View Characters: 10 animated 32x32 pixel art heroes and enemies: run, jump, attack, hurt and death, left and right. One of the 150 packs in Gridwright.

Some sheets also leave a margin around the edge (an offset) or a gap between cells (spacing). If the width doesn't divide cleanly by the cell size, the leftover pixels are one of those. Check them before you trust a cell size.

2. Know what is in each row

Many sheets keep one direction per row and put more than one animation in it. Each of the adventurer's rows starts with 2 idle frames and ends with 4 walk frames, so playing a whole row gives a character that idles, then walks, every loop. The pack's JSON lists the cells of each animation (on the top row, down idle is at x 0 and 16, down walk at x 32 to 80), and the loose PNGs are named the same way, adventurer_down_walk_1.png to _4.png.

Top-Down Characters
Top-Down Characters: 16x16 top-down pixel art RPG characters: 4 directions, idle and walk animations, emotes. One of the 150 packs in Gridwright.

3. Set the speed

Speed is set in frames per second, and one loop lasts the frame count divided by it. The adventurer's walk is 4 frames at 8 fps, so one step cycle takes 0.5 seconds. Its idle is 2 frames at 3 fps, about 0.67 seconds. Those are the speeds the pack's README suggests. Judge them against how fast the character moves in your game: if the body moves faster than the feet, it skates; if the feet are faster, it scrambles in place.

4. Loop, or ping-pong

A plain loop plays 1, 2, 3, 4, 1, 2, 3, 4. Ping-pong plays forward and back without repeating the ends: 1, 2, 3, 4, 3, 2. It suits things that swell and settle, like an idle breath, a floating gem or a flame, and doubles a short loop with no new art. Walk cycles are drawn to loop forward; ping-pong one and the legs reverse mid-step.

5. Look for wobble

The most common fault doesn't show in the PNG at all. One frame is drawn a few pixels to the side of the others, and in motion the character jumps sideways once per loop. The engine draws every frame at the same spot, so a frame drawn off-centre in its cell is a frame that moves.

Two ways to catch it:

  • An onion skin. Show the frame before, and the one after, faintly under the current one. A pop or a slide is obvious when you can see where the last frame stood.
  • The feet. For anything on the ground, compare where each frame's lowest pixels are. They should stay on one spot, give or take the pixel a stride moves them.

We measured two sheets this way. All 24 adventurer frames line up. The knight walk we use as the tool's demo was drawn with two faults on purpose: frame 3 stands 3 pixels too far right, and frame 6 sits 2 pixels too far left and 2 too high.

Preview it in Godot 4

Godot can play a sheet in the editor. Add an AnimatedSprite2D, give its Sprite Frames a new SpriteFrames and open the SpriteFrames panel. Click Add Frames from Sprite Sheet, pick the PNG, set Horizontal to 6 and Vertical to 4, click the four walk cells in order and add them. Set Animation Speed and Animation Looping, then play it in the panel.

The same in code, as we ran it in Godot 4.7.2:

func _ready() -> void:
    var frames := SpriteFrames.new()
    frames.add_animation(&"walk")
    frames.set_animation_speed(&"walk", 8.0)
    var sheet: Texture2D = load("res://adventurer.png")
    for i in 4:
        var cell := AtlasTexture.new()
        cell.atlas = sheet
        cell.region = Rect2(32 + i * 16, 0, 16, 16)
        frames.add_frame(&"walk", cell)
    $AnimatedSprite2D.sprite_frames = frames
    $AnimatedSprite2D.play(&"walk")

What we checked on the way:

  • A new animation starts at 5 FPS with looping on. Set the speed, or every sheet plays at 5.
  • Each frame has a duration of 1.0 that multiplies its time. At 8 fps a frame lasted 0.125 seconds; with a duration of 2.0, 0.25. That holds the last pose of an attack without copying the frame.
  • At a fixed 60 frames a second, the 8 fps walk looped every 30 frames (0.5 seconds), firing animation_looped. With looping off, animation_finished fired at 0.5 seconds and the sprite stayed on its last frame.
  • 4.7.2 has a ping-pong mode: frames.set_animation_loop_mode(&"walk", SpriteFrames.LOOP_PINGPONG) played 0, 1, 2, 3, 2, 1, 0.
  • For a quick look without SpriteFrames, a Sprite2D with Hframes 6 and Vframes 4 shows one cell at a time, counted left to right, then down: frame 9 is column 3 of row 1, from 0.

What the panel lacks is a way to compare frames: no onion skin (Godot's onion skinning is in the AnimationPlayer editor) and nothing that marks a frame drawn off-centre. You see the wobble, then hunt for it.

The fast way: the Sprite Animation Previewer

The Sprite Animation Previewer runs all five checks on one page in your browser, with nothing to install. Open it here: 3 days for $1 opens it on your own sheets, with every other tool.

  1. Drop a sheet or loose frames. It finds the grid itself (on the adventurer: 16 x 16 cells, 6 by 4, 24 frames), with offset and spacing fields if you need them. Loose frames are sorted by number and grouped by name, so the adventurer's 24 PNGs come in as 8 animations.
  2. Play it. Pick a row or a group, set 1 to 30 fps, tick ping-pong or flip, step frame by frame, zoom, and pick a transparent, dark, light, green, pink or own background.
  3. Read the marks. The onion skin shows the frame before in red, and the one after in blue. Each frame's box and anchor are drawn over it, and the frame strip numbers every frame that is off. On the knight: 2 of 6 frames off, by up to 3 px.
  4. Line them up. One tick moves the stray frames onto their feet or their middle, across, up and down, or both. Frames off by 1 pixel stay put unless you set that to 0, and the cells grow if a moved frame would be cut.
  5. Save it. The sheet as a PNG, a GIF at 1x to 8x, and a Godot 4 SpriteFrames, or all three in one ZIP.

The SpriteFrames has one animation per row or name group, at your speed, looping; ping-pong is written out as frames. The one it made for the adventurer loaded in Godot 4.7.2 as four animations of 6 frames at 8 FPS. Keep the .tres next to the PNG. More on the GIF in Sprite Sheet to GIF, and on player scripts in Godot Sprite Sheet Animation.

The demo runs on our knight with every option. Everything works on your own sheets in the full tool, with your work saved to your account and every export: 3 days for $1 with every Gridwright tool, then $17 a month.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes

FAQ

Why does my sprite jitter in Godot when the sheet looks fine?

Usually a frame or two is drawn off-centre in its cell. Godot draws every frame at the same spot, so the drawing moves. Step through it with an onion skin, or let the Previewer count them.

Check it before it ships

Open the Sprite Animation Previewer, drop your sheet and watch it at your game's speed before it goes in. For characters that already line up, with their speeds in the JSON, Top-Down Characters has every character as sheets and single frames. The tool and the pack are part of Gridwright: 44 tools and 150 asset packs, 3 days for $1, then $17 a month.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes