
Publisher
godotengine
Hierarchical Finite State Machine Demo
This example shows how to apply the State machine programming pattern in GDscript, including Hierarchical States, and a pushdown automaton. Why use a state machine: States are common in games. You can use the pattern to: 1. Separate each behavior and transitions between behaviors, thus make scripts shorter and easier to manage. 2. Respect the Single Responsibility Principle. Each State object represents one action. 3. Improve your code's structure. Look at the scene tree and FileSystem tab: w...
Godot demo projects
Each folder containing a project.godot
file is a demo project meant to
be used with Godot Engine, the open source
2D and 3D game engine.
Godot versions
- The
master
branch is compatible with Godot'smaster
development branch (next 4.x release). - The
3.x
branch is compatible with Godot's3.x
development branch (next 3.x release). - The other branches are compatible with the matching stable versions of Godot:
Importing all demos
To import all demos at once in the project manager:
- Clone this repository or download a ZIP archive.
- If you've downloaded a ZIP archive, extract it somewhere.
- Open the Godot project manager and click the Scan button on the right.
- Choose the path to the folder containing all demos.
- All demos should now appear in the project manager.
Try the demos in your browser
Most of the demos are exported to GitHub Pages. They can be viewed here.
Note: The performance of Godot in a browser is lower than natively on desktop. For the best performance, consider downloading the demos.
Useful links
License
Those demos are distributed under the terms of the MIT license, as described in the LICENSE.md file.