Pacman clone
About
A Pacman clone in C++, this was a school assignment.
CONTROLS: SPACEBAR and ARROW KEYS to move
Ghost AI
The ghosts has 3 behaviors : hunting, fleeing and scatter. When a ghost spawns it enters scatter mode.
- Scatter: It goes to a specific corner of the level. When the ghost has reached its destination it switches to hunting mode.
- Hunting: All the ghosts have different behaviors here.
- Blinky: Samples pacmans position and heads towards it.
- Pinky: Samples the intersection pacman is looking at and pathfinds to it, constructing a path around pacman. If Pinky is located at the intersection when sampling, she heads towards pacman.
- Inky: Switches between the other ghosts behaviors at random.
- Clyde: Walks around randomly.
- When pacman eats a pill the ghosts turn blue, and when the blue animation is over they switch to scatter mode.
When a ghost has sampled a target for pathfinding, it does not update it again until it has reached its target.
System requirements for PC
Last Modified: Jan 9, 2019
Where to buy
itch.io