AI...


For me, this was arguably the most dreaded part of the project, or in other words, the most difficult part. But thanks to Aron Granberg and his A* Pathfinding asset, I was saved from countless hours of research and confusion when trying to understand why my aliens were  adamant about spinning in circles instead of moving to the player.

With basic pathfinding set in place for all three of the alien types: Spies, Commanders and Soldiers, it was time to customise them! Tailoring the AI to what I needed took me on a journey of "self discovery" where I started out with what could only be described as a... disliking for AI. But after developing the behaviours of the aliens, I discovered a deeper interest into the topic and am keen to learn more on it. 

Let me give you a little insight as to what the AI consists of. With the soldier alien, I have set it up to follow the player. There's not much else to them really. They're not the brightest bunch. Next is the Spies. These aliens are quick, mobile and annoying to be honest. They will move to the closest player and lock onto their target. Once within a close distance, they will repeatedly dart around the player at a fast pace, making them hard to hit. Finally is the commander. These larger aliens will move towards the player but as soon as they get low on health, they will retreat, only returning when strong enough.

Although I'm glad to have this part of the game completed, I will miss developing the AI... despite the number of hours I was left regretting even including artificial intelligence in my game...

Leave a comment

Log in with itch.io to leave a comment.