home page icon Flash Bestiary / Mazes / Grid Maze
   

Grid Maze

This, maze uses a more-abstract (and powerful) maze-generation object, employing the same algorithm from the previous movie. This object is used as a parent class for all the remaining mazes in this chapter (despite their different appearances).

The Maze class treats the maze as a 1-dimensional array of cells. Any shape which can be divided into discrete cells can be turned into a maze by the Maze class. You can make circular mazes, jigsaw-puzzle mazes, 3D mazes, and so on.

It is the responsibility of the descendants of this object (GridMaze, PolarMaze, HexMaze and so on) to determine how to map the 1-dimensional cell indices to graphical display coordinates, and also to figure out how the cells connect to each other. The maze object takes care of punching holes in the walls to build the maze.

Use the buttons to make the maze simpler or more complicated. Press the die to randomize the maze.

There is an interactive version of this maze here, in my fun & games area.

 

sourcecode iconDownload the flash project
book iconJim's Favorite Actionscript Books
wiki iconAsk Jim about Actionscript
Next: Polar Maze

Having trouble opening the project? You may need to Upgrade to Flash MX 2004



Copyright © 2003,2004 by Jim Bumgardner. All Rights Reserved.        Leave Jim some feedback