AI Questions

So after using the engine for quite a while now and feeling like I can do just about all I need for my project, I have a few unanswered questions about AI that are slowing me down.

  1. I have no idea how we’re truly supposed to handle AI getting around the world. Pathfinding works but I cannot figure out how to know when an AI is stuck or can’t reach its destination. The error log knows the AI is stuck and can’t move, but I have no method of reading this or being alerted when it’s happened. I could take action to solve its current state, but without knowing it’s in that state, my hands are tied. I just have to look away from that stuck AI while making videos and that’s not good.

  2. I don’t understand why pathfinding results are always returning “Success” when the AI has clearly not even made it remotely close to his destination. How can we accurately tell if an AI made it to his destination without having a bunch of distance checks on top of everything? We have acceptance radius but I don’t know what state the AI is in while moving to that point, what state he’s in when he’s trying to move there but cant’ make it and what state he’s in when he actually makes it into that radius.

In this case, I want all my AI to scatter to the nearest despawn point for several reasons. Upon arrival, I want them to delete. They’re either getting stuck on something and can’t figure it out or they run two steps and immediately delete (miles away from where they should do this). If I tell my AI to “move 2000 units over there” I don’t believe any use of the term “success” should be introduced until he’s actually succeeded in what I’ve told him to do. Right now he says “ok, I’ll run all the way ther…DONE!”

  1. There’s no way we can be expected to ensure that our navmesh is perfectly connected all over the entire gameworld. In my case, I have separated islands of navmesh all over the place…literally. Up until this point I’ve simply not even attempted to get them to figure this problem out so they can bridge gaps between nav islands. What are we actually ‘supposed’ to do here?

Basically I see several options for reading what pathfinding state the AI is in and would like clarification if possible about what that means, how to use the information and when to know what type of pathfinding state(enum) we’re looking for. It all seems to differ between tasks, services, AiChars and AiControllers. They appear to access this kind of information in different ways in the same fashion as how we access blackboard values differently based on where were’ accessing from. This kind of thing adds a lot of confusion and kind of always leaves (to me at least) a lingering feeling that I’ve may gone the wrong way in using it.

I know AI is relatively young and I’m not complaining about the tools. I actually love them. If I could just get past these couple of relatively major issues, I can get my enemies doing just about anything.