@TheShaggyDev
  @TheShaggyDev
The Shaggy Dev | Implementing the state pattern in Godot 3 @TheShaggyDev | Uploaded November 2021 | Updated October 2024, 22 minutes ago.
Let's take a look at how we can implement the state pattern in Godot. Using a simple platformer project, I'll show the basic technique using enumerators and a more fully featured state machine that uses Godot's node system to provide extra conveniences over a pure code solution.

Intro: 00:00
The enumerator method: 00:53
Technique overview: 01:45
Player and state manager breakdown: 03:33
Individual states: 05:40
Conclusion and running the project: 06:58

Theory video: youtu.be/-ZP2Xm-mY4E

Part three of this series: youtu.be/DPxIMVC0oZA

Source code: github.com/theshaggydev/the-shaggy-dev-projects/tree/main/projects/godot-3/the-state-pattern

Transcript: shaggydev.com/2021/11/15/state-machines-godot
Implementing the state pattern in Godot 35 tips for better platformer controlsPixel-perfect collisions on sprites in GodotConfiguring Godots built-in code editor5 more changes to GDScript 2 in Godot 4 youll want to know aboutBuilding a more advanced state machine in Godot 3How to write more flexible game codeAnimating a hardware cursor in Godot - An experimentFixing menu transparency issues in Godot 4How to make a tactics game in only two weeksGame development in the dying days of FlashA few common code smells to be aware of and how to fix them

Implementing the state pattern in Godot 3 @TheShaggyDev

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER