You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The algorithm for generating the mazes was inspired by that described on Shaun Lebron's Github, which additionally defined constraints of traditional pac man mazes
Map is 28x31 tiles
Paths are only 1 tile thick
No sharp turns - intersections are separated by atleast 2 tiles
1-2 tunnels
No dead-ends
Only I, L, T, or + wall shapes are allowed, including the occasional rectangular wall
Any non-rectangular wall pieces must only be 2 tiles thick
Original Pacman maze
The algorithm
The algorithm designed for this project relies on a tetris style building technique. A shape would be selected at random from a list of allowable states, and fit into a random position. Certain requirements for the board such as the pen for the ghosts to spawn in were taken into account for that step as well. This was repeated until the no more pieces could fit onto the board, at which point it was mirrored horizontally. This produced the structure pictured on the right. That picture also displays the marked small horizontal and vertical manipulations that occured to get the board to fit the 28x31 dimensions. The image on the left depicts the maze drawn from the original structure. Tunnels were easily added after the construction of the maze after considering which rows they could occur on.