In the course of several projegs i have been creating some different AI’s, some more advanced than others.
I have always just been using the Controller_BP to store relevant variables, along with handling events that executes the actions.
Now i am thinking about becoming friends with the behavior tree instead.
Are there any significant advantages of using the BT instead of the regular BP, or is it just simply anpther way of organizing events and variables.
What are the workflow pros/cons of using one over another.
What are the engine proc/cons on using one over another (Are processes more smooth on the one. Does one of them require more/less rescources than the other etc.)
Or is it a no brainer, that i should just move over to BT ASAP
Raw BP should be used for simple AI, such as simple MoveTo or easy tasks like “Run away and turn Alarm on when sighting”
As soon as you want to have something more complex, such as a AI which can be fought against, you should use Behaviour Trees. They’re easier to read and extend.
IMO I have used both and BP are way easier for simple things but like Raidex said once you want an enemy to attack or do more complicating things the BP’s get confused and runs like poop when you have multiple AI’s using the same BP’s. BT’s are a little more difficult to understand (at least for me it is) but do work alot better and WAY more efficient when it comes to FPS and CPU usage.
I am making a simulation game, where the AI acts as customers or staff in a store. So they have a few move to, actions, but have a lot of calculation, like desire to enter the store, to decide if an article is worth purchasing, filling up the storage, interacting with the register and so on.
I have this working as Raw BP, where it works as it should.
i can see the value in using this in an Action game like a FP shooter, or the lieks of that.
But in a situation like mine would it then be adviasable to use BT, since the actions are not constantly updating, along with not using any pawn sensing, but instead very variable heavy?
Yes personally i would suggest a BT over raw BP but if you were to to rawBP use Events, Functions and event dispatchers to the max, you could even spawn in invisible actors and use different ones for things like BPEnterStore only have this run when a variable reaches X then could launch from that actor to another one called BPPurchaseItem that calculates the item to buy. Either way I would just split the BP’s up into different actors or use a BT.