In this devlog I share all the scenarios and cases I had to handle in order to implement a Hunter Killer enemy type that uses my implementation of the AStar pathfinding algorithm.
Enemy Pathfinding Checklist
Below is a checklist of the things I had to think about to make the behavior work in any scenario.
- Where is the player or target?
- Handle the player respawning
- What is the goal location?
- What if the primary goal is blocked?
- What if all secondary goals are blocked?
- What if there is no path to the goal?
- What if there is nothing at all open?
- Reached goal, now what?