More AI trouble
For the cutscene I’m currently building, I need an epic battle feel between a lot of cultists and corporate hit men… The basic code for it works fine (they have a faction and all the aggression code is based on that). To make the fight never-ending, as soon as one dies, another spawns.
The problem is that the problems I’ve been struggling for ages on the pathfinder and AIs become more noticeable when you have so many running at the same time… I’ve done a video to show you the issue:
Initially, I thought the problem was due to the collision avoidance, but on the video above, I have that part of the code turned off, and it still twitches like hell…
So, the possible culprits is the pathfinder itself (unlikely, I think, since there is a path between the opponents, as illustrated by the arrows), or a fast switch between agro targets… Anyway, this is hard to debug, because when I stop the action to inspect the entities, I’m looking at a snapshot of a moment, and only by sheer dumb luck I’ll catch the actual moment when the bad decision was made, and even if I can, I need to track one entity that’s actually doing that, etc… And I can’t reduce the number of entities, because this only happens when I have lots of those.
If I was using my “Spellbook” engine, I would have a lot of debug stuff I could use to track the problem (record the actual state of the finite-state machines that comprise the AI is easy on Spellbook), but since I’m using my lightweight engine “Cantrip” (because of the way this game was born, in a 48-hour competition), I don’t have those luxuries, so I’ll need to identify possible causes, and do the code to be able to see the issues more clearly.
The joys of gamedev!
Now listening to “Ziltoid, the Omniscient” by “Devin Townsend”
Link of the Day: I don’t even understand exactly what I’m seeing here, but it is awesome! AR/VR is starting to do amazing stuff:
Comment
You must be logged in to post a comment.