BoolClub / ProjectCrusade

First project of RHS Software Development Club
0 stars 0 forks source link

New enemy AI #43

Closed christiancosgrove closed 8 years ago

christiancosgrove commented 8 years ago

Made significant changes to the way enemies track the player. Instead of directly following the player regardless of obstacles, enemies now track the player using A* pathfinding if an obstacle is in its way. Furthermore, an enemy can “remember” the player for a certain period (10 s) after losing line of sight, thereby making it more difficult for the player to escape them.

Patrolling was also implemented. When an enemy does not know of the player, it randomly moves around. Pathfinding should probably also be incorporated into this (i.e. the enemies vacillate between a group open locations on the map and use pathfinding to navigate).