Walk frames, spritesheets, and alien characters for animation
This is the easiest approach to sprite animation in Unity. The Kenney base pack provides each animation frame as a separate image file. You simply select all the frames, drag them onto your character, and Unity creates the animation for you automatically. No slicing or configuration needed.
Location: Base pack/Player/
| File | Description |
|---|---|
| p1_stand.png | Idle pose (single frame) |
| p1_walk/ folder | 11 walk frames (p1_walk01.png to p1_walk11.png) |
| p1_jump.png | Jump pose (single frame) |
| p1_duck.png | Crouch pose (single frame) |
| p1_hurt.png | Damage pose (single frame) |
For students who want to try the spritesheet approach, the Kenney base pack also includes all animation frames packed into a single image. This is more advanced but is how professional games typically handle sprites.
| File | Location | Description |
|---|---|---|
| p1_spritesheet.png | Base pack/Player/ | All frames in one image |
| p1_spritesheet.txt | Base pack/Player/ | Frame size/position data |
The Kenney alien character sprites are the recommended choice for animation because they come with the most animation states. Each alien colour has individual frame images that are easy to work with (like Option A) plus bonus climb and swim animations.
Location: Extra animations and enemies/Alien sprites/
Beige • Blue • Green • Pink • Yellow
| File | Description |
|---|---|
| alienBeige_stand.png | Idle pose |
| alienBeige_walk1.png | Walk frame 1 |
| alienBeige_walk2.png | Walk frame 2 |
| alienBeige_jump.png | Jump pose |
| alienBeige_duck.png | Crouch pose |
| alienBeige_hurt.png | Damage pose |
| alienBeige_climb1.png | Climbing frame 1 |
| alienBeige_climb2.png | Climbing frame 2 |
| alienBeige_swim1.png | Swimming frame 1 |
| alienBeige_swim2.png | Swimming frame 2 |
If you prefer the spritesheet workflow (Option B style), pre-made spritesheets for each alien are located at:
Extra animations and enemies/Spritesheets/alienBeige.png
Each spritesheet comes with a matching .xml file containing the exact slice data for each frame.
After creating your animation clips, you need to set up the Animator Controller to switch between them. The Animator uses a state machine — each animation is a "state", and you define rules (transitions) for when to change states.
| Parameter | Type | Purpose |
|---|---|---|
| Speed | Float | 0 = idle, >0.1 = walking/running |
| IsJumping | Bool | true when the player is airborne |
For an extension challenge, you can animate enemies using the same drag-and-drop method you learned for the player character. Each enemy has individual frame images for different states.
Location: Extra animations and enemies/Enemy sprites/
| Enemy | Idle | Move | Dead | Hit |
|---|---|---|---|---|
| Slime | slime.png | slime_walk.png | slime_dead.png | slime_hit.png |
| Bat | bat.png | bat_fly.png | bat_dead.png | bat_hit.png |
| Bee | bee.png | bee_fly.png | bee_dead.png | bee_hit.png |
| Spider | spider.png | spider_walk1/2.png | spider_dead.png | spider_hit.png |
| Snake | snake.png | snake_walk.png | snake_dead.png | snake_hit.png |
| Ghost | ghost.png | ghost_normal.png | ghost_dead.png | ghost_hit.png |