you can see which branch is active.īy the way, I am using a hard coded behavior tree at the moment, similar to what you described, because of better performance, and because I do not use the UE4 navmesh pathfinder. Do it your way first, you’ll learn more.įor prototyping Behavior Trees are cool because of the runtime visual debugging functionalities, i.e. It’s best to learn these things by doing them, not by hearing someone else’s opinion. If there were other people though, and they started suggesting changes to the behaviors and you were reluctant to change it because it was already coded then you would have a problem. “Hardcoding” behaviors is very brittle in my opinion, but if it’s a tiny project with only you as a developer there’s no harm in it. Yes, you have some overhead to learn the system that somebody else made, but once done it’s flexible and will perform well. With the addition of the EQS system the given Behavior Tree system is very robust. The behaviors themselves are components and any of the entities can be assigned them and weights through the editor. Interrupting events can call it to get one to switch to if it’s in a Behavior. It is ticked once to get the next behavior to execute. In one of my projects I made a “Utility System”. If you can’t see the advantages of Behavior Tree’s and the provide system there is no reason for you to use them. Thanks in advance for any answersĭo it your way if that’s what your comfortable with. presenting the behavior to the art team or a potential investor or w/e, I don’t see an advantage of using them. 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++?Īpart from it looking “pretty” and friendly for those who have no programming experience, eg. 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. Note that the UpdateBehavior was declared virtual, with an empty implementation. 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. 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(). 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. The other functionalities are quite similar to Unity, such as detecting input, physics interaction, raycasting, etc. Recently I watched a tutorial series on youtube and got to this video: Unreal Engine C++ Tutorial - Stealth Game AI I’m kinda new to Unreal Engine, but I’ve worked with Unity for a couple of years now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |