Monday, July 14, 2014

Enemy AI behavior

What makes the enemies tick? A lot more than two weeks ago, that's for sure.

Recent weeks have been focused mainly on game design, but there has also been some steps forward regarding the enemy AI. Few improvements to mention are that the enemies now react to sounds and suspicious noises, and seek to investigate their source.

Also, if player is unlucky enough to get caught by a patrolling enemy, the resulting chase won't be an eternal one since skillful players can now outrun and hide from enemies, at which point they start to look for you in the area where they think you are hiding in.

I ended up doing this by making the enemy unit find the closest walkable ground tiles in the area where it saw the player last. It then adds the waypoints to a list and forms a new patrol area based on their distance to the last known player location.


A link to a 1,9 megabyte .gif

Improvements like these actually make the enemies seem to have some brains (or CPU's depending on the enemy type) instead of behaving like zombies with only one kind of behavior. There is still plenty of work to be done regarding the AI, but it's getting there.

Beyond AI improvements, there has been some major strides regarding the gameplay itself. We are in the process of making the gameplay system more fluent and easier to use but still keeping the game challenging. More about this later, so stay tuned!

-Timo

No comments :

Post a Comment