Leprechaun enemy AI
Following on with my idea to re-use the player movement logic with the enemy "AI", I've been doing some thinking. Basically, the enemies will have two modes: chase & hunt (each enemy working independently). In chase mode the enemies move in the direction of the player, i.e their virtual joystick is pointed towards the player. However, if they get blocked, they flip into hunt mode. In hunt mode their virtual joystick changes direction (clockwise or counter clockwise, randomly, mirror?). They stay in hunt mode until they fall or their hunt direction matches the chase direction. I'm hoping is the enemies will avoid getting trapped in sections of the level and the hunt mode will allow them to work out "how to get there from here". Kinda a right wall/left wall follow idea.Oh, I'm also thinking that the initial hunt/chase mode & hunt direction will be part of the level data. So a level creator will be able to determine in which direction the enemies start moving. This could be away from the player!
0 Comments
Recommended Comments
There are no comments to display.