RECOMMENDED READING: Understanding Pac-Man Ghost Behavior

(0)

Excerpt from Understanding Pac-Man Ghost Behavior by Chad Birch on GameInternals:

Each of the ghosts is programmed with an individual “personality”, a different algorithm it uses to determine its method of moving through the maze. Understanding how each ghost behaves is extremely important to be able to effectively avoid them...

The key to understanding ghost behavior is the concept of a target tile. The large majority of the time, each ghost has a specific tile that it is trying to reach, and its behavior revolves around trying to get to that tile from its current one. All of the ghosts use identical methods to travel towards their targets, but the different ghost personalities come about due to the individual way each ghost has of selecting its target tile. Note that there are no restrictions that a target tile must actually be possible to reach, they can (and often are) located on an inaccessible tile, and many of the common ghost behaviors are a direct result of this possibility...

READ ON »