Finite State Machines - Learn by making a RPG Pet!

Опубликовано: 25 Июль 2026
на канале: Outback Nerd
959
52

I wanted to add my dog Meadow to the game I have been working on and noticed she seemed to have a series of states she switches between. That led me to learning a little bit about finite state machines to try and implement her in the game in that manner.

Here I walk you though what I learned to save you the time if you are still figuring this sort of thing out.

I hope you learn something!

_____________________________________________
Godot Engine: https://godotengine.org
_____________________________________________
Assets: https://outbacknerd.itch.io/
_____________________________________________
Github: https://github.com/OutbackNerd/
_____________________________________________
Website: https://ajpatrick.io
_____________________________________________
All music is from my own album!
https://open.spotify.com/album/44qsrG...
_____________________________________________
Chapter Time Stamps:

00:00 Introduction
02:40 Resources
03:00 Project Overview
03:30 New Scene
05:00 Animations
08:30 Script Discussion
09:00 BasePetState Script
10:08 IdlePetState
10:50 WanderPetState
11:45 FollowPetState
12:55 WhistlePetState
13:40 ChasePetState
15:15 Player Changes
17:45 Enemy Changes
19:20 Pet Script

__________________________________________