Settings

Theme

Pac-Man Maze Generation

shaunlebron.github.io

107 points by kanamekun 5 years ago · 6 comments

Reader

codeulike 5 years ago

See also 2010 article about Pac-Man Ghost behaviour, its suprisingly complex for 1980, and each of the four ghosts have slightly different behaviour

https://gameinternals.com/understanding-pac-man-ghost-behavi...

colordrops 5 years ago

Not nearly as hard of a problem, but I built a maze on a Minecraft server for my kids, and used an online random maze generator as a reference. I realized the walls in the generated maze were thin lines of 0 thickness whereas the maze in Minecraft needed to have walls of 1 block thickness. It wasn't hard to redraw the maze by hand with non-zero width walls, but interestingly I had no choice but to redraw it because I couldn't do the conversion in my head and build the maze using the original.

  • sokoloff 5 years ago

    Wouldn’t a doubling of all squares (and replacement of one of those with a block where walls existed) do it? (It’s not clear that you could totally reliably do that in your head while doing whatever other editing/creation task was needed, but the naive algorithm seems pretty straightforward.)

    • colordrops 5 years ago

      Yes, you've got it exactly correct - I was able to draw it out using a simple algorithm, but couldn't do it mentally in-game by looking at the original.

phkahler 5 years ago

The generated mazes have an incredibly pac-man look to them. I didnt expect my reaction to them. OTOH none of them have the longer paths of some of the Ms Pacman mazes.

While reading I thought the approach seemed overly complex, but the results are very nice.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection