Pixel Art Attack Animation: Wind-Up, Strike and Recovery

· 9 min read · Loopixel team

Frames and measurements from a real Loopixel attack sheet; engine calls from the official docs

Eight frames of a pixel knight sword slash labelled ready, wind-up, swing, strike and follow-through

An attack has to do two jobs at once: look powerful, and tell the player exactly when it hurts. Both come from the same thing, which is how the frames are timed. This guide covers the four phases of an attack, how many frames to give each, what a real 8-frame sword slash looks like frame by frame, how to hold the hit frame, and how to turn a looping attack into a one-shot move your game can trigger.

On this page · 8

The four phases

  1. Wind-up (anticipation). The weapon and body move away from the target. It is the warning, and a bigger move back means a heavier hit.
  2. Swing. The fast part. One or two frames, often with a streak or a stretched weapon so the eye sees motion, not a jump.
  3. Strike (contact). The weapon at full reach. This is the frame the player remembers, so it is the one you hold.
  4. Recovery. The weapon comes back and the body settles into the ready pose. It is where the player is vulnerable and cannot act, so keep it only as long as the move should cost.

Timing is part of the design. A player attack that must feel responsive gets a short wind-up. An enemy attack the player should dodge gets a longer, clearer one. The same drawings with different timing give you both.

How many frames

FramesWhat you getGood for
3Wind-up, strike, recovery. Nothing in betweenTiny sprites, fast enemies, prototypes
5Ready, wind-up, swing, strike, recoveryMost side-on games
8Two ready frames, two wind-up frames, swing, strike, follow-through and a returnLarger sprites (48 to 128 px) and showcase animation

Most of the frames go to the wind-up and the recovery, not the swing. The swing is the shortest part: if you draw it with five frames it looks like a slow wave, not a hit.

A real 8-frame slash, frame by frame

This is the knight's heavy slash from the pixel art animation generator, an actual Loopixel output at 64 px. The phase names are ours, from looking at the frames.

Eight frames of a pixel knight swinging a sword: ready, ready, wind-up, wind-up, swing, strike, follow-through, back to ready
The 8 frames of the real knight heavy slash sheet at 2×, on one ground line. The labels are our reading of each frame.
FramePhaseWhat you see
1ReadySword resting on the shoulder
2ReadyThe same pose: only 59 pixels differ from frame 1
3Wind-upThe blade swings back and up behind the shoulder
4Wind-upThe blade is steeper, held higher behind the head
5SwingThe sword comes over the head, with a white streak near the blade tip. The cape flares out
6StrikeThe blade is fully forward and level. The widest frame of the animation
7Follow-throughThe blade points straight up after the hit
8ReturnBack on the shoulder, almost the ready pose: only 71 pixels differ from frame 1

Frames 1 and 2 are nearly identical, and frame 8 is nearly frame 1 again. That gives the loop a short pause on the ready pose before the next wind-up, and it means you can cut the attack out of the middle: frames 3 to 7 are the move itself.

Knight swing frame, strike frame, and the two overlaid in red and green to show the blade travelling from overhead to level
Frame 5 (swing) and frame 6 (strike) at 4×, then the two overlaid. The colours are added only for this figure. The blade goes from overhead to level in one frame, which is why the swing frame carries a streak.

Reach and frame size

Bar chart of the width of the opaque pixels in each of the 8 attack frames: 36, 36, 35, 34, 42, 57, 33, 36
Width of the opaque pixels in each frame, measured on the real sheet (sword included). The strike frame is 57 px wide; the others are 33 to 42 px.

The strike frame uses 57 of the cell's 64 px, and its blade reaches pixel column 62, a single pixel from the right edge. That has two consequences. Slice with the exact cell size: a 63 px cell would clip the tip. And if you draw your own attack, plan the cell for the frame with the longest reach, not for the standing pose. The sprite sheet slicing guide shows how a wrong cell size shows up.

Reach also decides where the sprite sits when you flip it or hold a pivot at the feet. A character that lunges forward for the strike can appear to slide if the engine keeps the cell centre fixed. Keep the feet planted and let the weapon do the reaching, as this sheet does: the lowest opaque row is y = 62 in every frame.

Hold the hit, time the hitbox

The strike frame is where the player feels the hit. Two small things make it land: hold the frame a little longer than its neighbours, and switch the hitbox on only while it is on screen.

Godot 4

  1. Put the 8 frames in a SpriteFrames animation named attack. To hold frame 6, give it a longer relative duration (SpriteFrames.set_frame takes a duration argument, default 1.0), for example 2.
  2. Connect the frame_changed signal of the AnimatedSprite2D and read its frame property. The property counts from 0, so frame 6 of the sheet is 5.
  3. Enable the hitbox when frame is 5 and disable it when the frame moves on.

Unity

  1. In the Animation window, open the clip and add an Animation Event on the strike frame (right-click the Event line and choose Add Animation Event).
  2. In the Function field pick a method on the character. An Animation Event can call a method with one parameter, or one that takes an AnimationEvent object if you need more.
  3. Use a second event after the strike to turn the hitbox off again.

At 10 fps every frame lasts 100 ms, so frame 6 starts 500 ms after the loop starts. If you trim the ready frames to make the move snappier, the strike starts earlier, and the hitbox follows only because it is tied to the frame and not to a timer.

Make it play once

The sheet loops, but an attack should play once and hand control back. In Godot, turn looping off for the attack animation (SpriteFrames.set_animation_loop) and connect animation_finished. The signal is emitted when a non-looping animation reaches its end and is not emitted for a looping one, so it only works once looping is off. Then play idle again from that signal. The jump guide splits a loop into states in the same way.

If you want the move to start at the wind-up and end at the follow-through, use frames 3 to 7 only. The free sprite sheet cutter splits the sheet into one PNG per frame, numbered _00 to _07, so you can build the animation from the frames you want and use frames 1 and 8 as the idle pose. If you change a frame by hand, the sprite sheet maker puts the frames back on one sheet.

Common mistakes

  • No wind-up. The attack starts with the weapon already forward. It reads as a teleport and the player cannot react.
  • Recovery as long as the attack. The player feels locked out of controls. Shorten it, or make it the price of a stronger hit on purpose.
  • A hitbox for the whole animation. Damage appears while the sword is still being drawn back. Tie it to the strike frames.
  • Clipping the weapon. The cell is smaller than the longest reach, so the tip is cut off. Size the cell for the strike frame.
  • Sliding feet. Keep the feet on the same row in every frame and move the weapon, not the whole body, unless the attack is a lunge.
  • Looping the attack. Let it play once and go back to idle, or it will swing again until you press something else.

Quick answers

Is there a separate slash effect?

The streak on the swing frame is part of the character frame. Loopixel also has a VFX action for effects such as spells, made as its own sheet; see the animation generator.

Does the attack come in four directions?

No. Attack is a single-direction action. Only the walk cycle has four directions; see the 4-direction sprite sheet page. In a side-on game, flip the sprite to face left.

How does it connect to my walk and run?

Switch from walk, run or idle to the attack from the same ground line and pivot, then back again when it ends. If the feet sit on different rows, the switch will show as a jump.

Sources

Engine menu paths and property names above were checked against the official documentation:

Try it with one image

Upload one image and get an 8-frame pixel sprite sheet in about a minute. 1 credit per animation, credit packs from $2.99, paid once.

Create a sprite sheet