occupyjae.blogg.se

Maze generator algorithm
Maze generator algorithm





maze generator algorithm

The edges of the resulting tetris pieces correspond to walkable paths in the maze. Gravity pulls the pieces in the left direction rather than down.

maze generator algorithm

We start by stacking tetris pieces on a 5x9 grid.

  • Any non-rectangular wall pieces must only be 2 tiles thick.
  • Only I, L, T, or + wall shapes are allowed, including the occasional rectangular wall.
  • intersections are separated by atleast 2 tiles). The mazes are built carefully to closely match design patterns deduced from the original maps found in Pac-Man and Ms. It will slowly be refined (your feedback appreciated) until it is all stated as clearly as possible.

    maze generator algorithm

    This page is an effort to begin communicating how the algorithm works. Generating random Pac-Man mazes is a deceptively difficult problem that I spent some months working on.







    Maze generator algorithm