How to make a pixel art idle animation

Updated · Adib Khan

A small pixel-art character breathing in place, its head and shoulders sinking one pixel and rising again
The idle made for this page: four frames, the longest held for half a second. Open it in the editor.

What an idle is for

An idle is what a character does when nothing is happening. In a game it plays for most of the time the player is looking at the character, so it should be quiet enough to ignore and alive enough that the character does not look frozen. That is a small target, and it is why a good idle is mostly restraint.

The most common idle is a breath: the head and shoulders sink a little and rise again. Others are a blink, a tail flick, a shift of weight from one foot to the other, or a bit of cloth that sways. Pick one, and do it well. Doing three at once looks restless.

The idle on this page is the breathing kind, on a 16 by 16 sprite. It is four frames and loops in 1.4 seconds.

Draw an idle loop for your character.Open the editor

Steps

  1. Draw the rest pose. Frame 1 is your character standing, relaxed, feet planted. Make this the best frame, since it shows for the longest.
  2. Duplicate it with D. Now change one thing by one pixel. Here the head and shoulders go down one pixel while the legs and feet stay put. Select everything above the belt with the select tool and nudge it down with the arrow key, or redraw the rows by hand.
  3. Duplicate again for the low point, and squash the torso by one pixel, so the body is a pixel shorter, with the arms a pixel lower. This is the breath out.
  4. Duplicate the second frame for the way back up. Frame 4 is frame 2 again, so the loop goes rest, down, low, down, and back to rest.
  5. Look at it with ghosts on. Press O. When the tints of the neighbouring frames sit almost on top of each other, the movement is small enough. If you can count the pixels it moved, it is probably too much.
The PixelFlipbook editor with the four-frame idle open: the character on the canvas and four thumbnails in the timeline marked 600, 150, 500 and 150 milliseconds, with a tag named idle above them
The idle open in the editor. The timeline shows the four times, and the tag bar above the frames shows the tag.

Timing and speed

This is where an idle comes alive. If every frame shows for the same time, the movement ticks along like a metronome. Uneven times read as breath: a long pause at rest, a quick move, a pause at the low point, a quick move back.

The idle here uses 600 ms on the rest pose, 150 ms on the move down, 500 ms on the low pose and 150 ms on the move up. Set each by selecting the frame and typing in the Duration box beside the timeline, or use Alt+U to open the duration dialog. Times run from 10 to 65535 ms.

Slow it down further for a sleepy character, or speed the moves up for a nervous one. The total length of the loop is what the player feels, so a few hundred milliseconds either way changes the mood a lot.

Other ways to loop it

Ping-pong. Instead of drawing the way back, draw the way down once and let the tag play it forwards and then backwards. In the Tags dialog set the direction to Ping-pong and turn on Loop this tag when playing. Three frames, rest, down, low, play as rest, down, low, down, rest, and so on, and neither end frame is shown twice. That is one drawing saved, and it is what many engines do with a ping-pong tag.

Note that a GIF does not use tags. It plays every frame in the timeline, in order, once through, and then loops. If you want a back-and-forth in a GIF, put the return frames in the timeline, as the idle on this page does.

The Tags dialog in PixelFlipbook: a form to add a tag with from and to frames and three direction buttons for forward, reverse and ping-pong, then the tag named idle for frames 1 to 4 with its own direction buttons and a toggle labelled Loop this tag when playing
The tag dialog: a name, the frames it covers, a direction (forward, reverse or ping-pong) and the loop toggle.

Common problems

Tag it and export

Tag all four frames as "idle". For a GIF, open File, then Export, and choose GIF. For a game, choose Spritesheet, which writes a PNG and a JSON file that carries the tag and the times, and the Godot guide shows how a tag becomes an animation.

Open this idle as your own copy to look at how it is built. Each time you open it you get a new project, and the original is not changed. When you are ready for something louder, the explosion guide is next.