Lesson 5 · Animation

Making a Four-Frame Animation

Make a four-frame pixel animation: a bouncing slime with squash and stretch, onion skin and frame timing, exported as a looping GIF. Editable files included.

By Updated 25 min read

The finished bouncing slime animation looping

Steps at a glance

  1. Draw the resting pose. Draw the slime in its resting shape on frame 1.
  2. Duplicate and squash. Duplicate the frame and redraw the slime wider and shorter, as if pressing down.
  3. Duplicate and stretch. Duplicate again and redraw the slime taller and narrower, lifted off the ground.
  4. Add the landing frame. Add a fourth frame close to the resting pose so the loop returns smoothly.
  5. Set timing and export. Set frame durations, preview the loop with onion skin, and export an animated GIF.
On this page
  1. How pixel animation works
  2. Step 1: Draw the resting pose
  3. Step 2: Find the timeline
  4. Step 3: Duplicate and squash
  5. Step 4: Duplicate and stretch
  6. Step 5: Add the landing frame
  7. Step 6: Set the timing
  8. Step 7: Export an animated GIF
  9. Common animation mistakes
  10. Using layers in animations
  11. Reading your animation critically
  12. Ideas to practise
  13. What you practised

Animation is where pixel art comes alive, and it is less work than it looks. A convincing loop can use as few as four frames. In this lesson you will animate a slime that squashes, jumps up in a stretch, and settles back down. Along the way you will learn the timeline, onion skin and frame timing, and you will export your loop as a GIF.

How pixel animation works

An animation is a sequence of frames, each a complete image, shown one after another. In the editor, every frame has the same layers, and each layer has separate pixels in each frame. Each frame also has its own duration in milliseconds, so you can hold a pose longer or flick through a fast movement.

The core principle for this lesson is squash and stretch: a soft object gets wider and flatter when it presses down, and taller and narrower when it moves fast. Keeping roughly the same area in each pose makes it feel like the same blob of jelly.

Step 1: Draw the resting pose

Open the starter. It is a green slime on a 16×16 canvas: a dome shape about ten pixels wide with a dark outline, three greens, two eyes and a highlight on the upper left.

Frame 1: a green slime in its resting pose
Frame 1, the resting pose. Open this step.

If you would rather draw your own, use the recipe from Drawing a 16×16 Icon: silhouette, flat color, shadow along the bottom, highlight on the top left. Keep the bottom of the slime on the same row in every frame; that row is the ground line.

Step 2: Find the timeline

The Frames timeline is below the canvas on a computer (on a phone, open it from the bottom bar). It shows a thumbnail for each frame, the current frame’s Duration and these buttons:

ButtonWhat it does
+ (Add blank frame)Adds an empty frame after the current one.
Duplicate frameAdds an independent copy of the current frame.
Move earlier / laterReorders the current frame.
Delete frameRemoves the current frame.
Onion skinShows the previous frame faintly while you draw.

Keyboard: [ and ] go to the previous and next frame.

Step 3: Duplicate and squash

Select Duplicate frame. You now have two identical frames, and you are on frame 2. Turn on Onion skin: the previous frame shows as a faint ghost under the current one, so you can see exactly how much the shape changes.

Now redraw the slime squashed:

  1. Make it two pixels wider on each side.
  2. Make it two or three pixels shorter, keeping the bottom on the ground line.
  3. Move the eyes down with the body, and keep them the same size: eyes that change size look like a different character.

A quick way to move the top half down: select it with Select and move (M), drag it down, and press Enter to drop it. Then repair the edges with the pencil.

Frame 2: the slime squashed wide and low
The squash frame, drawn over the onion skin of frame 1. Open the two-frame file.

Step 4: Duplicate and stretch

Go back to frame 1 ([) and duplicate it again, then move the new frame so it comes after the squash. Redraw it stretched:

  1. One or two pixels narrower on each side.
  2. Two or three pixels taller.
  3. Lifted off the ground line by one or two pixels, so it reads as a jump.

The highlight stays on the upper left in every frame. The light does not move just because the slime does.

Step 5: Add the landing frame

The fourth frame brings the slime back down. Duplicate frame 1 and move it to the end. The loop now goes: rest → squash → stretch → rest. When the animation repeats, the last frame flows straight back into the first.

The four frames side by side: rest, squash, stretch, rest
All four frames: rest, squash, stretch, rest.

Step 6: Set the timing

Timing is what makes the same four drawings feel heavy, bouncy or nervous. Select each frame and type its duration in the Duration box (milliseconds):

FramePoseDuration
1Rest180 ms
2Squash120 ms
3Stretch (in the air)120 ms
4Rest180 ms

Holding the rest poses longer than the movement gives the bounce a sense of weight. Use for all copies the current duration to every frame if you want an even rhythm.

Select Play preview (the triangle button in the timeline) to play the loop at its real timing; select it again to pause. Playback never changes your artwork, and the Actual size preview shows how the bounce reads at 1×.

The finished slime animation playing
The finished loop. Open the final file.

Step 7: Export an animated GIF

Open Export › Animated GIF. Choose a scale (4× gives a 64×64 GIF; 8× gives 128×128) and keep Loop forever on. The GIF uses the durations you set.

Two GIF limits to know:

  • No partial transparency. Pixels under 50% opacity become transparent, the rest become solid.
  • Timing in hundredths of a second. 120 ms is stored as 12/100 s. Very short delays (under 20 ms) are slowed down by most browsers.

For a game engine, a sprite sheet is better than a GIF. That is the next lesson.

Common animation mistakes

  • Changing the volume. If the squash is wider and as tall as the rest pose, the slime seems to grow. Wider means shorter.
  • A moving ground line. If the bottom row jumps around in the rest and squash frames, the slime appears to float or sink.
  • Eyes that wobble. Keep features the same size and move them as a group with the body.
  • Even timing for everything. Constant timing feels mechanical. Hold key poses, speed up transitions.
  • Too many frames. Each extra frame is more to draw and keep consistent. Get four frames feeling right before adding more.

Using layers in animations

Every frame shares the same layers, and each layer has its own pixels in each frame. That makes layers useful for keeping parts of an animation separate:

  • Put a shadow under the slime on its own layer. In the stretch frame, make it smaller and lighter, which makes the jump feel higher without moving the slime further.
  • Put the eyes on their own layer, so you can move them with Select and move without redrawing the body.
  • Keep a background layer that is the same in every frame. Duplicate frame copies it automatically.

Hide a layer with its eye icon to check one part of the animation at a time. Hidden layers are not exported.

Reading your animation critically

Watch the loop at actual size and ask:

  1. Does it read in one second? If someone has to watch it several times to see what happens, the key poses are not different enough.
  2. Where does the eye go? Movement attracts attention. If a small detail flickers, it will distract from the main motion.
  3. Is there a pop? A sudden jump in the loop usually means the last frame does not lead into the first. Step from the last frame to the first with ] and [ and look for the jump: the shape, position or colors should change only as much as between any other two frames.
  4. Is it too smooth? Pixel animation often looks better with fewer, clearer frames than with many tiny changes that blur together.

Ideas to practise

  • Blink: a three-frame loop for any character: eyes open (long), half closed, closed (short).
  • Flicker: a candle flame with two or three slightly different shapes at 100 ms each.
  • Float: a ghost moving up one pixel and back down, four frames.
  • Coin spin: a coin getting narrower until it is a line, then wider again, six frames.

Find more starters on the pixel animation maker page and in pixel art ideas.

What you practised

  • Using frames, duplicate frame and onion skin.
  • Squash and stretch with a stable ground line.
  • Timing key poses longer than in-betweens.
  • Exporting a looping GIF and understanding its limits.

Frequently asked questions

How many frames does a good pixel animation need?

Fewer than you think. Idle and bounce loops often use 2 to 4 frames, walk cycles 4 to 8. Good timing and clear key poses matter more than frame count.

What frame duration should I use?

Around 100 to 150 milliseconds per frame is a good default. Hold the key poses longer, for example 180 ms, and make in-between frames shorter.

Why does my GIF play at the wrong speed?

GIF stores delays in hundredths of a second, and some browsers slow down very short delays. Keep each frame at 20 ms or longer, and the timing you set in the editor will be preserved.

Next lesson Exporting a Sprite Sheet Export a pixel art animation as a sprite sheet PNG with a JSON frame list: choose layout, padding and scale, then load it in Godot, Unity, Phaser or GameMaker.

Written and tested by Kamel Medlej, who builds and maintains the tools on Pixel Art Drawing. Every step in this article was checked in the current version of the editor. Found a mistake? Tell us.