Splicetoday

Pop Culture
Feb 20, 2009, 08:25AM

The Age of (Too Much) Information

Everything you ever wanted to know about Pac-Man.

Cornering example2.png?ixlib=rails 2.1

It...it's just...wow:

Anytime Pac-Man eats one of the four energizers on the level, the ghosts reverse direction and, on earlier levels, go into frightened mode. Frightened ghosts turn dark blue and wander about the maze for a few moments, flashing briefly as a warning before returning to normal. Ghosts use a pseudo-random number generator (PRNG) to pick a way to turn at each intersection when frightened. The PRNG generates an pseudo-random memory address to read the last few bits from. These bits are translated into the direction a frightened ghost must first try. If a wall blocks the chosen direction, the ghost then attempts the remaining directions in this order: up, left, down, and right, until a passable direction is found. The PRNG gets reset with an identical seed value every new level and every new life, causing predictable results. This is why the frightened ghosts' movements are repeatable in the context of a memorized pattern or sequence. As the levels progress, the time ghosts spend in frightened mode grows shorter until eventually they no longer turn blue at all (they still reverse direction). Refer to Table A.1 in the appendices for the frightened time in seconds and number of flashes, per level.

Discussion

Register or Login to leave a comment