Monday, 30 November 2015

AA Shooting game: AI path-finding

For my game I'd like to have enemies that move up towards the player from cover to cover, before finally approaching the generator object and attacking it. In order to do this I need to use a navigation mesh and set points for the enemies to move between. I've created an array of points for the enemies to choose from, where they're limited to choosing from groups of four at a time. With the checkpoints set in rows of four, the enemies move from row to row advancing towards the players and generator.

rows of checkpoints

Unfortunately when all areas around the generator are occupied by enemies, even though I tell the next wave to wait until they're free, they try to occupy the spaces and cause a huge stack overload. Hence for now I've been forced to step back from the AI path-finding and had to stick with simply spawning them at set points around the players. I would like to play with this again when I have more time but for now, I have to give up on it.

No comments:

Post a Comment