This article explains basic do’s and dont’s about Behavior Trees that majority of community missing.
https://dev.epicgames.com/community/learning/tutorials/L9vK/unreal-engine-common-issues-with-behavior-trees-and-things-you-should-competely-avoid
I liked the article but i would differ and say if you know c++ do not use blueprints.
Blueprints are so much harder to maintain than c++. The amount of time i save debugging more than makes up for the time it takes to make the class. Its way easier to understand what unreal is trying to do when you can peak at their code quickly and even step through the native UE5 code.
As far as iteration speed goes using unreal engines live coding makes it extremely quick.
You have to make sure you have behaviors in its own module so you are not recompiling everything in your project. Turn on multi-threading for compiling and it will take not time to compile and test. Basically as fast as clicking the compile button on a blueprint.
Thank you for the extensive write up! It is much appreciated. I’ve tried Behavior Trees in a couple past prototypes and was always left with the feeling that I’m forcing a square into a triangle shaped hole. I felt like the system was working against me, not with me. Now I know why. I was using them wrong. And I learned a new design pattern: GOAP! Definitely will be educating myself on that one, as it sounds like it could be just the alternative I need.
Thanks for the reply - I just realized people can comment to articles lol.
My idea behind encouraging Blueprint usage is, Unreal Engine’s Blackboard and BT implementation is not flexible enough to let people do their scripting inside of the BT itself.
So you’ll find yourself writing behavior specific tasks a lot, and Live Coding is broken as Hot Reload because if you have reinstancing option enabled it’ll break your BP references.
I’d prefer writing Blueprints first, then nativize to C++ code on the long run if required. Though, of course, this is depends on your own workflow.
I’m very happy to hear that article helped you! I also went through similar things, and only managed to find the correct direction thanks to the people I know that was more experienced than me. So it would be a shame if I wouldn’t share it!
Though I think I should do a re-write one day and explain things in more details and share other cool stuff.
If you’re interested, I also write a blog and possibly I’ll continue with AI articles in there: https://intaxwashere.github.io/
(puts on dunce hat) so by State Machine you mean the one found in the Animation blueprints?
Or is there just some blueprint I build myself to be the state machine?
This article covers essential do’s and don’ts about Behavior Trees that are often overlooked by the community.