filmov
tv
Game Programming Patterns in Godot: The State Pattern (Finite State Machine)
Показать описание
(Disclosure: As an Amazon Associate I earn from qualifying purchases.)
Learn how to implement the **State Pattern** in Godot to create a robust **Finite State Machine** for your game! In this tutorial, I’ll guide you step-by-step through building an efficient system for managing game states, perfect for character control and more.
🔔 Subscribe:
Subscribe to my channel to see more videos like this:
📖 Useful resources:
- Open source project created in this video:
- Tileset used in this project:
🔵 Follow me:
Find out about my latest videos and publications:
⏳ Timecodes:
00:00 - State Pattern introduction
01:03 - Finite State Machine implementation setup
04:06 - Defining the State class
05:52 - Defining the State Machine class
09:34 - Preparing the player scripts
12:02 - Creating the idle and movement states
15:17 - Loggign what the State Machine is doing
18:42 - Adjusting character movement
20:47 - Solving character's facing
22:08 - Adding the jump state
29:04 - Conclusion
---
Music credits:
Track: Alexi, Action, Infraction- Witch's Whispers
Music provided by Infraction No Copyright Music
Комментарии