Uploaded August 2025 | Updated September 2026, 3 days ago
Node-Based Finite State Machine implementing Idle, Run, Attack, Hurt & Death states. This state machine is reusable; feel free to implement it however you want.
- Related Videos -
Farming Game - youtube.com/playlist?list=PLDvxSFN380vDtBE4J3ITEhwKpoA_qbgDd
- Timestamps -
0:00 - Preview
0:28 - Animation Setup
0:39 - Finite State Machine
2:00 - BaseState (Abstract Class)
2:23 - Idle State
3:34 - Run State
5:04 - Attack State
8:36 - Hurt & Death State
10:46 - Fixes
11:22 - Thanks!
- Code -
Enemy - pastebin.com/sqc9Qfym
State Machine - pastebin.com/nsTyfSmX
Idle - pastebin.com/7dXiJikM
Run - pastebin.com/mFyYVn6T
Attack - pastebin.com/DZU9Y4KJ
Death - pastebin.com/WZpvCGg0
- Sprite Used -
free-game-assets.itch.io/free-top-down-orc-game-character-pixel-art
- Patreon -
patreon.com/16BitDev
- Discord -
discord.com/invite/AYv8FRz5ag
Node-Based Finite State Machine implementing Idle, Run, Attack, Hurt & Death states. This state machine is reusable; feel free to implement it however you want.
- Related Videos -
Farming Game - youtube.com/playlist?list=PLDvxSFN380vDtBE4J3ITEhwKpoA_qbgDd
- Timestamps -
0:00 - Preview
0:28 - Animation Setup
0:39 - Finite State Machine
2:00 - BaseState (Abstract Class)
2:23 - Idle State
3:34 - Run State
5:04 - Attack State
8:36 - Hurt & Death State
10:46 - Fixes
11:22 - Thanks!
- Code -
Enemy - pastebin.com/sqc9Qfym
State Machine - pastebin.com/nsTyfSmX
Idle - pastebin.com/7dXiJikM
Run - pastebin.com/mFyYVn6T
Attack - pastebin.com/DZU9Y4KJ
Death - pastebin.com/WZpvCGg0
- Sprite Used -
free-game-assets.itch.io/free-top-down-orc-game-character-pixel-art
- Patreon -
patreon.com/16BitDev
- Discord -
discord.com/invite/AYv8FRz5ag










