Godot Version
4.6.
Question
Hey everyone,
I am currently playing around with NPCs and NavigationRegions.
Additionally I want to add some kind of AI (not the bad kind) to my NPCs so that they move to certain spots or do certain actions based on their stats and on the daytime.
Since I am still fairly new to NPC behaviours I was wondering if I could get some advice on which system to use. I already googled and youtubed my way through this topic but wanted to get some real experience.
So when would I use behaviour trees and when would I use state machines?
Thanks in advance.
state machines are used for simplier stuff, while behavior trees are used for more complex AI but the AI that don’t have to really change, rather have pre-planned schedue / pre-planned actions
i’d use state machine if i had guard that need to patrol area, and shoot if player is in his FOV cone, but i’d use behavior tree or neural network if i had to make AI that learns about it’s surroundings or have more complex actions and more states
I think for what you are describing, I’d try something like Beehave or LimboAI, which are Godot plugins that support behavior trees. Because you basically want to map out complex behaviors based on a number of variables.
Yea, thats what I found to be the most fitting as well. I think I’ll give beehave a shot.
Thanks.