In this multi-part series, and show you how to use all of the relevant systems and features (Behavior Trees, EQS, Navigation Meshes, AnimBlueprints, AnimMontages, and more) to design, create, and optimize AI for use in a game environment with all of the requirements and restrictions that go along with that.
In Part 5, and are joined by Sr AI Programmer Zielinski, so we can get another set of eyes on what we’re doing and talk about using AI Perception for our little guys to find things.
Feel free to ask any questions on the topic in the thread below, and remember, while we try to give attention to all inquiries, it’s not always possible to answer’s questions as they come up. This is especially true for off-topic requests, as it’s rather likely that we don’t have the appropriate person around to answer. Thanks for understanding!
I just re-watched the part 4 on YouTube (I missed the first half at the life-stream). Is there a reason why you are not using the behavior trees specially made for the certain stats? In part 3 we implemented this clever system in where the behavior tree called the smaller tree’s depending on which stat we needed? Is this obsolete?
I think your theory, at the beginning of part 4, that the project didn’t save was false. It was the same as mine at home and in your effort to fix it, you reverted the project back. I thought you should know.
I LOVE THESE! One of the best series you have ever been released!
By the way, is there a you guys do a same kind of thing [good, complete, well explained, high leveled…] tutorial series on Game Setup, Game Mode, Game State, Building, Setting, and post-prototyping a game? It would be awesome. I’m really enjoying these!
As talked about on the stream there are a number of books available for learning about game AI programming. Even if you are using Blueprints for most everything, there’s definite value in knowing the patterns and math behind the systems you see in other games. As I’m not a huge fan of re-inventing the wheel, I’ll definitely be picking some of these up myself.
Game AI Pro - wrote a chapter in this one covering the previous incarnation of EQS used in Bullet Storm
All the books bridge a chunk of time, the first Game Programming Gems is from 2000 and the last published of those listed is Game AI Pro 2 in 2015. However, the math and logic behind how much of AI doesn’t really change much, so even older books in this list are useful. Honestly? Check your local libraries, probably can check them out for free! =)
As for the numbered series, Game AI Pro and Game AI Pro 2 for example, they are not revisions, more like how there was Mastering Unreal 1 and 2 (the red and blue books): Same general topic, just different specific areas.
How much of a help are they, when put through the filter of Unreal Engine? I had a look at these books previously, but didn’t buy because of a combination of a) cost and b) I wasn’t sure if they were going to be about a level of programming that was unnecessary to a UE dev (e.g. talking about adding line traces to your engine, for example).
So I’m trying to create a custom generator like you are for my game except the work-around you use to get the AI character will only work for a single AI character. How would I go about this if I have multiple AI on the map? I know put exposing the “owner” on his todo list, and hopefully he’s able to get it implemented for 4.11 but in the mean time, there has got to be some way to know who is calling the query? Any work-around for multiple AI characters/controllers??
jtsmith - I don’t have the project in front of me, but I think the fix we did was to do a range based calculation given the location of the context given (the AI Character) and every AI Character, finding the closest one. This should work even with more than one AI Character. I’ll double check this in a bit.
Jezcentral - I’m just scratching the surface of the Game AI Pro book, and yes, it’s solid. 1st chapter covers how neurons work and how that enables you to create more believable reactions from your AI like on average humans have a 0.2 second reaction time, or 6 frames at 30 fps, which then frees you up to distribute calculations for your AI over many frames and still have it feel good.
Personally, I like to read, and I find the information they contain to be quite valuable.
What’s the best practice for using AI behavior trees in coordination with Animation blueprints?
For example, let’s say I have a monster who performs a grab attack. If the grab attack collides with an actor, I want to continue with the animation. If the grab attack fails to grab a character, I want to abort the animation and the AI behavior should try to do something else (such as moving closer or trying again). Currently, I’m using an anim notify event in the animation blueprint. When its triggered, the animation blueprint calls a method within the creature blueprint, such as “bool TryGrab()” which returns either true or false. If the grab succeeds, the animation proceeds. If it fails, it has to inform the Behavior tree by setting a behavior tree value to “aborted”. Otherwise, the behavior tree task is continuously waiting for the animation blueprint to set a blackboard key to “animation complete”, so that it can report “End Execute - Success” and move on to the next task.
One of the problems I’m finding with this setup is that this is very dependent on the animation blueprint to actually fire its anim notify events. For some unknown reason, in some cases, the anim notify events don’t get triggered. This causes the behavior tree to not get the “all good!” signal and it just continuously polls a task, waiting for it to complete when it never will.
I’ve tried to look at other content examples, but none seem to have a deeply complicated animation blueprint system or AI system for me to learn from. Am I doing all of this the wrong way?