#FSM question

1 messages · Page 1 of 1 (latest)

night saffron
#

i've looked at the tutorial here and i've been left with a question. why use nodes? from what i can see you could just have a normal class for the StateMachine and have it store normal class States in a dictionary? or is it better to have everything as nodes or smth?

GDQuest

The State pattern is an essential one for game developers. In this guide, you'll learn to create a finite state machine in Godot and when to use the pattern.

whole cobalt
#

They are easier to grasp and you can get some use out of the MainLoop class.

But yeah, you don't need nodes. None of my FSMs use them.

night saffron
#

ok, ty for answer