Shakeskeyboarde / neverhaven

ISC License
1 stars 0 forks source link

Game entity finite state machine. #5

Open Shakeskeyboarde opened 3 months ago

Shakeskeyboarde commented 3 months ago

Looks like the best way to implement AIs is probably a finite state machine. Found an interesting article about different ways to implement it here: https://gameprogrammingpatterns.com/state.html.

I think this will probably be something like a hierarchical state machine, with several state machine "slots" per entity (eg. movement, equipment). I'd like to standardize the states, actions, and slots a little so that entity AIs are reasonably consistent.

Shakeskeyboarde commented 3 months ago

This would also be useful for the worker state.