Animate a pixel art jump

Updated · Adib Khan

The same small runner jumping on a green ground line: a crouch, a push, arms up on the way up, a tucked pause at the top, arms up again on the way down and a squashed landing with dust
The jump made for this page: six frames, the crouch and the landing held longest. Open it in the editor.

The shape of a jump

A jump is a story told in a very short time: the character gets ready, pushes off, rises, hangs, falls and lands. Every part has a job. Skip the first and last and the jump has no weight. Skip the middle and it is a teleport.

Two ideas carry most of the work. The first is squash and stretch: the body is short and wide when it pushes against the ground, and long and thin when it moves fast. The second is timing: the slow parts, the crouch and the landing, are where the character feels heavy, and the quick parts are where it feels light.

The jumper below uses the same little character as the run cycle. Open it in the editor and press Space to see it move. It is a new project each time, so nothing you do to it changes this page.

Open the jumper and change it.Open the editor

The six frames

  1. Crouch (160 ms). The character is squashed. The head is lower, the knees are bent and the feet spread. This is the wind-up, and it is held a little longer so the eye notices it.
  2. Push off (90 ms). Stretched tall, up on the toes, with the legs straight and the arms down at the sides. The body is at its longest here.
  3. Rise (90 ms). The feet leave the ground and both arms go up. The legs trail below, a little apart.
  4. Apex (120 ms). The top of the arc, where a jump moves slowest, so it is held a little longer. The knees tuck and the arms come down beside the body.
  5. Fall (90 ms). The arms go up again and the legs reach down for the ground. The character is two pixels lower than in the rise, and stretched.
  6. Land (160 ms). Squashed again, with the feet spread and a puff of grey dust on either side. The loop then goes back to the crouch.

The ground is a single dark green line on the bottom row of every frame. A line like that is a cheap way to make the character feel like it stands on something, and it gives the eye a fixed place to measure the height of the jump against.

Steps

  1. Start a 16 pixel sprite with File, New sprite, 16, Create.
  2. Draw the ground and the crouch on frame 1. Put the ground on the bottom row, in dark green, and stand the character on the row above it.
  3. Add the next frame with N. The ground has to be redrawn on each blank frame. A faster way: press D instead, which makes a copy of the current frame and selects it, ground and all, and then erase and redraw the character.
  4. Turn the ghosts on if they are off (the O key). With them on, you can see the last frame in a faint outline and judge how far to move the body.
  5. Draw the apex first, then the frames on either side. It is easier to place the top of the arc and fit the rise and fall below it.
  6. Set the times. Select a frame, then change Duration beside the timeline (on a phone, Expand timeline, then Frame actions, then Set duration): 160, 90, 90, 120, 90 and 160 ms, which is 710 ms in all.
  7. Press Space to play, and step through with the comma and full stop keys to check each frame.
The PixelFlipbook editor with the jump open: the apex frame on the canvas, the tucked character in the middle of the picture above a dark green ground line, and six frame thumbnails below with their times
The jumper on its apex frame. The green line on the bottom row is the ground.

Set the timing

The timing here is uneven on purpose: 160, 90, 90, 120, 90 and 160 ms. A real jump is slowest at the top and at the two ends, and the frame times follow that. If you set all six to the same time, the jump still works, but it looks like a machine doing it.

The Duration box sets one frame. For a group, tap the first frame, shift-tap the last, and use the clock button. On a phone the Duration box is not there: tap Expand timeline, then Frame actions, and choose Set duration. The editor accepts 10 to 65535 ms for a frame, and a GIF stores time in steps of 10 ms, so choose times that are multiples of 10 and you will get exactly what you set.

The PixelFlipbook editor on the fourth frame of the jump with the ghosts showing: the frame before and the frame after drawn faintly around the tucked character, and the Ghosts button in the timeline switched on
With the ghosts on, the frames either side of the apex show faintly, so you can see how far the body travels.

Export the GIF

Open Export with Ctrl+E, choose GIF and press Export GIF. For a 16 pixel sprite the editor suggests ×8, so the file is 128 by 128 pixels. The GIF plays all six frames once, in order, and loops. If you would rather have each frame as its own picture, the PNG tab can export them.

A jump in a game is usually split in three: rise, hold and fall, because the game decides how long the character is in the air. Tags help with that. The Godot guide shows how a tag in PixelFlipbook becomes an animation in Godot.

Tips