This site will look much better in a browser that supports web standards, but is accessible to any browser or Internet device.

SVG Maze Maker

Example ASCII maze

During the middle of 2004, my son was extremely interested in mazes. We could not get enough mazes for him to solve. As a Perl programmer, I decided there must be some way to generate mazes and went to CPAN. I found Games::Maze. I printed a few pages of these mazes, and he was happy. (See example.)

Unfortunately, the ASCII-based maze was not really satisfying for me. So I wrote code to convert the output of Games::Maze to SVG. This made much nicer looking mazes. I worked for a while to make the lines look better and to vary the corners to generate mazes that looked even better.

But the mazes were still missing something. So, I added the scripting support that would make the maze playable. I wrapped an HTML form around the generation program to allow it to be launched from the web.

Here's the Maze Creation Form.

I haven't focused much on making the creation form attractive, and I still have more work to do on variations on the maze's look, but it is playable at this point.

The current version of the MazeMaker generates mazes that work well with ASV on Firefox and IE. They have also been tested on the Batik Squiggle viewer. At the moment, I have not had time to do much testing on the Firefox 1.5 native SVG support. Stay tuned for updates on that front.

Since the last version, I have managed to get the walls on the hex and rectangular hex mazes cleaned up similar to what I had done on the rectangular mazes in the beginning. All three maze shapes now support more than one wall form.

The code to generate the SVG maze is now available as a module on CPAN (Games::Maze::SVG). This module incorporates all of the code to translate the output of Games::Maze. The module also contains support for the interactive mazes, including the ECMAscript code that drives the game and the CGI script that generates the mazes.

I finally had the time to make the changes needed to work with the FireFox 1.5 native SVG support. This required a few style changes, some minor implementation cleanup, and a major change to keystrke handling.

Valid XHTML 1.0!