Pac-Man · Arcade · 1980 · Impact: Hidden for decades; now part of expert strategy
When Pac-Man faces up, two of the ghosts aim at the wrong tile: an overflow in the targeting code shifts their target to the left as well as ahead. Players had been playing around the bug for decades before anyone documented it.
Each of Pac-Man's four ghosts chases him differently. Blinky, the red ghost, targets Pac-Man's own tile. Pinky, the pink ghost, tries to get ahead of him by aiming at a point four tiles in front of the direction he is facing. Inky, the cyan ghost, uses a more complicated calculation that starts from a point two tiles in front of Pac-Man. Clyde alternates between chasing and wandering off depending on how close he is. The "in front of" calculation contains an error. As Jamey Pittman documented in his detailed analysis of the game's code, The Pac-Man Dossier, when Pac-Man is moving upwards an overflow in the logic that computes the offset adds a leftward offset equal to the upward one. Pinky therefore targets four tiles up and four tiles to the left of Pac-Man rather than four tiles straight up, and Inky's starting point becomes two tiles up and two tiles to the left. The result is subtle. Ghosts in Pac-Man choose their direction only at intersections, steering towards whichever neighbouring tile is closest to their target, so a shifted target changes their route only some of the time. But it is consistent, and it means that facing upward makes Pinky noticeably less effective at cutting Pac-Man off. Patterns and strategies developed by top players already accounted for the ghosts' real behaviour; the code analysis explained why the ghosts behaved that way.
Most famous bugs announce themselves — a corrupted screen, a crash, an impossible item. This one is invisible. A ghost steering slightly off-target looks exactly like a ghost making a choice, and Pac-Man's ghosts were designed to look as though they had personalities. The flaw was absorbed into that illusion for years.
It is also a small illustration of how much behaviour the original 1980 hardware compressed into very little code: a single offset calculation, shared by two ghosts, carrying one error that only appears in one of four directions.