Enemy AI Updates


In one of our earlier sprints one of my tasks was creating two new enemy types, a ranged enemy and a support enemy. The support would help the other enemies by healing and buffing anyone in range, but it does not have an attack, so it relies completely on having others around it. Its behavior would revolve around staying close to other enemies but running away when the player gets too close.   The ranged enemy is exactly what it sounds like, it attacks its target from further away. Its behavior would work very similar to the original melee enemy with the only difference being that if the player got within a certain distance they would begin to move away to keep a larger distance between them. After implementing this however I found both of these behaviors to feel a bit unnatural and unclear. The ranged enemy would slowly start moving away from the player once it got to close but wouldn't really do much else even when the player got right next to them.  The support enemy would immediately run away once the player got too close, get to a point further away and then just run straight back to continue using its ability.

To fix this I began to try and think about how I would expect these enemies to react as a player and break down why what was currently happening wasn't working. Starting with the ranged enemy, they felt too slow as they moved away from the player and they were also a bit too similar to the support enemy in the way that both would just try and avoid the player. To add a little variety between the enemies I decided to change it so that instead of avoiding the player, they would run at them and try and push them away. This helped them feel like they were reacting to the player and being more proactive with their decision making.


With the support enemy it was clear that the biggest problem was that they would abandon the enemies they were helping the second the player got close enough. Because this enemy has no attack it needs to avoid the player but I decided to make it so that instead of just running away from the player they would move to a position that’s further away from the player but still close enough to the enemy he is trying to help. Using the EQS system I ran a few checks that would return a point further from the player but still close the enemy it is trying to help. This made it feel like they were still avoiding the player but still working with the other enemies in the level.


Leave a comment

Log in with itch.io to leave a comment.