I’m kinda new to Unreal Engine, but I’ve worked with Unity for a couple of years now.
Recently I watched a tutorial series on youtube and got to this video: Unreal Engine C++ Tutorial - Stealth Game AI
The other functionalities are quite similar to Unity, such as detecting input, physics interaction, raycasting, etc. but all these behavior trees and blackboards seem quite cumbersome and extra work to me and i would personally prefer implementing the AI behavior “manually” from the source code in the Tick() function, as I was used to in Unity.
In short, in Unity I had a structure similar to this: I had a class called EntityBase, which implemented 2 major methods: UpdateBackground() and virtual UpdateBehavior() { }. Unity’s Update function (equivalent to the Tick() in UE4) would call the UpdateBehavior, which would store some important values, and then call the UpdateBackground() which would use these values to control things like movement, cast spells, etc. Note that the UpdateBehavior was declared virtual, with an empty implementation. If i wanted to create a new NPC, I would just extend EntityBase and override UpdateBehavior(), where I would implement the specific behavior for the new NPC.
I would like to do the exact same thing in UE4, but are there any advantages to using behavior trees and blackboards over hardcoding behaviors in c++?
Apart from it looking “pretty” and friendly for those who have no programming experience, eg. presenting the behavior to the art team or a potential investor or w/e, I don’t see an advantage of using them. Thanks in advance for any answers