An overview of different ways to navigate
Pathfinding and navigation have been used in video games for much longer than one might think. Let’s explore a couple of navigation methods.
Distance-based navigation
One of the oldest games using a simple algorithm to mimic intelligent behavior for enemies is Pac-Man by Namco. Each of the four ghosts (Blinky, Pinky, Inky, and Clyde) has a slightly different kind of “character,” created only by the target point of the ghost’s movement.
While the red ghost (Blinky) is chasing Pac-Man directly, the pink ghost (Pinky) and the blue ghost (Inky) will try to get in front of Pac-Man, effectively trying to surround the player. The fourth ghost (the orange Clyde) has “a mind of its own” and switches between chasing the player and running away.
The decision about the new path to choose is made only at the intersections in the game’s maze and is based entirely on the distance to the target...