Walk Cycle Sprite
You'll take a character sprite sheet, yours or a free one, and get it walking, idling, jumping and flipping inside an engine without the feet sliding.
About
A sprite sheet in a folder is not a character. The engine work is slicing the sheet into frames, building a state machine that knows when to idle, walk and jump, flipping without redrawing anything, and matching the frame rate to the movement speed so the feet don't slide. Draw the sheet yourself if you like (the drawing craft itself lives over in Pixel Art), or take a CC0 one from Kenney or itch.io and credit it. Most first attempts slide, because the walk plays at the same speed no matter how fast the character is moving.
At a glance
- Per requirement
- 25 XP
- Completion bonus
- 150 XP
- Requirements
- 5
- Takes
- One weekend
- Skill level
- Beginner (done it a few times)
- Cost
- Free
- Supplies
- Nothing special
- Where
- At home
- Other people
- On your own
Requirements
-
1
Get a sprite sheet with an idle, a four-frame walk and a jump frame. Draw it at 16 by 16 or 32 by 32 if you want to, or download a CC0 pack and write down the credit. Lay the frames out in rows, one row per animation, because the engine's slicer expects a grid. Take a screenshot of the sheet with the rows labeled. Photo
-
2
Import it with nearest-neighbor filtering and slice it into frames. Blurry pixels mean the filter is wrong, so turn off linear filtering and mipmaps, and set the window to integer scaling. Slice the sheet by cell size rather than by hand. Record the frames playing in the engine's animation editor at 8 to 12 frames per second. Video
-
3
Build a state machine that switches between idle, walk and jump. Drive the transitions from velocity and an is-on-floor check, not from key presses alone, otherwise the walk plays while you push into a wall and the jump never ends if you hold the button. Record the character passing through all three states. Video
-
4
Flip the sprite in the engine on a direction change, and fix anything asymmetric. Flip the sprite node rather than the sheet, then check things like a sword hand or a satchel ending up on the wrong side. If the sheet has an asymmetry you can't live with, that's the one case where you draw the second direction. Record the character walking left, walking right and turning on the spot. Video
-
5
Match the walk frame rate to the movement speed so the feet don't slide. Scale the animation speed by the character's horizontal speed, or pick one speed and one frame rate and tune until a foot stays planted on the ground through the contact frame. Record the walk zoomed in at ground level so we can see the feet. Video