Perfect maze generation with Flash actionscript

In a perfect maze, there is one and only one path from any point in the maze to any other point. That is, there are no inaccessible sections, no circular paths, and no open regions.

Viewing a maze as a two-dimensional matrix of square cells, a perfect maze is one in which any two cells are connected by a single unique path. As a consequence of this definition, all cells in a perfect maze are reachable from the starting point by some unique path, meaning that perfect mazes are guaranteed to have a unique solution.

To generate a perfect maze, I ‘ll start with a maze in which all of the possible walls exist (i.e., a wall exists on every side of each cell), then continue removing walls until I have a perfect maze.

Here it is the source code, to be explained very soon.

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (12 votes, average: 4.33 out of 5)
Loading ... Loading ...
Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 4 comments

  1. AAR

    on March 24, 2007 at 7:34 pm

    Awsome!

  2. Perfect maze generation with AS3 : Emanuele Feronato

    on November 28, 2008 at 4:39 pm

    [...] about perfect mazes a couple of years ago with Step by step perfect maze generation with php and Perfect maze generation with Flash actionscript, but now it’s time to make it with AS3 and understand how can we use a perfect [...]

  3. Michael

    on December 3, 2008 at 6:48 am

    Great stuff… you may also be interested in my Amazing Renderer experiment:

    http://tinyurl.com/566cuc

  4. Big Spaceship | Labs Blog - Noise and Tile Based Maps, Pt 1.

    on November 3, 2011 at 12:03 am

    [...] on this is a little easier to come by — there's even some Flash implementations out there. Emanuele Feronato and Jobe Makar both have implementations of the same basics concept: – Create a multidimensional [...]