Spellcaster Studios

Make it happen…

AI issues

Still working on the AI issues I’ve found yesterday, although I’m getting closer to the problem…

screen207

I’ve built some rudimentary debug tools to track this issue, and I found the culprit… Basically, the AI twitches because it acquires and loses LOS on the current agro target.

The idea of the AI is to track the biggest threat and try to kill it… If it lost line of sight to it, it would move towards the position where it saw the enemy last and if it gained LOS, it would go back to shooting it.

What I’m seeing in practice is that the AI moves towards the last seen position, it sees the target and then loses it again, etc… The part I don’t undestand in this whole  issue is why it doesn’t move anyway towards the same position… If it sees or not the target should be irrelevant to the pathfinder, so the movement shouldn’t be “restarted” because of it, the target position is still more or less the same (give or take a couple of centimeters).

Now I have two choices: bite the bullet and rebuild the AI code, better structured and more organized this time, since I now know exactly what I need it to do, instead of keep adding to it, or just try to figure out why the behavior isn’t the one I want…

Now listening to “Faith” by “Eyes of Eden”

Link of the Day: I had more or less this conversation the other day with someone that wants to make games for a living… This article puts it better than I could, but it really matches to what I know: http://www.hobbygamedev.com/beg/a-frank-look-at-making-videogames-professionally/

Comment