Seeing Roadway Patterns
in Pac-Man

When we were kids, my little sister always loved it when my parents would switch lanes on the freeway, causing the dotted white line to pass directly beneath the moving car. She giggled every time...she said that we were eating the dots, like Pac-Man. I liked Pac-Man too, but I thought she was being pretty silly.

Wouldn't you know it -- nearly two decades later, it turns out that her silliness was actually quite insightful.

If one thinks of a car as Pac-Man, the dotted line in the road as dots, and the roads themselves as passageways in a giant maze, then many similarities become apparent between Pac-Man mazes and roadway systems, particularly LEGO baseplate road systems.

Passageways in Pac-Man mazes are segments of straight lines running parallel and perpendicular. When passageways intersect, they join to form crosses, tees, and corners. Each small section of straight passageway and each intersection or corner can be represented by a square cell. In the pictures below, cells are 8 x 8 pixels in size. Some cells contain dots to eat, others contain empty space, and the rest contain maze wall segments.

To visualize Pac-Man mazes as a LEGO road baseplate systems, simply change dots and empty spaces to road baseplates, and maze walls to houses or empty grass. The results are surprisingly realistic suburban roadway patterns!

These visualizations provide a bit of insight into pleasing yet functional patterns which could be generated automatically. Since each Pac-Man maze wall is two cells thick, it lends itself perfectly to a road system where there are exactly two houses between two parallel roads. The geometric shapes in maze walls also tend to fall into a few basic categories and sizes. If a small library of maze wall shapes were built, a road system could be grown incrementally simply by glomming on a shapes from the library to outlying areas when needed. Of course human supervision is probably still required, but the basic idea seems valid.

It is interesting to note that the game of Tetris uses a set of seven unique and very versatile shapes which interlock perfectly at right angles and can cover the cartesian plane. Although seven basic shapes are too few for a roadway generation application such as this, additional insight may be gained by studying patterns which arise in various Tetris game outcomes.

©1992,1997 Todd Lehman. All rights reserved.
Pac-Man and Ms. Pac-Man are registered trademarks of Namco Corp.