Maze Generator

An HTML5 / JavaScript maze generation engine and algorithm

http://www.before-reality.net/maze
Exit Printer-Friend Mode

?

About

This maze generator and the accompanying algorithm was inspired by a slide show by Jamis Buck called "Algorithm is Not a Four Letter Word." It is a great read that goes over what mazes are, various ways of generating mazes and the importance of working with algorithms. You can learn more about what I learned while making this generator and algorithm over at this blog post: Maze Generating Algorithms: Fun with HTML and JavaScript

To use the generator simply click 'generate' and a default maze will start popping up. You can set the width and height of the maze (within bounds based off of the cell size you select). If you make some changes, clicking 'generate' will clear the existing maze and start up another. If you'd like to play with the complexity of the maze, use the style modifier. Low numbers will result in long passages, high numbers will result in a lot of dead-ends. If you use a mid-range number you'll get a little of both. Once the maze is done generating, the start will be marked green and the furthest spaces from the start will be marked red.

Have fun and enjoy! If you have any questions or suggestions, be sure to check out the blog post and leave a comment! I'll post updates below as they roll in.

Updates

Sunday, May 12, 2013

Removed size limits and added scrolling if maze gets too large. Added zooming and save/load functionality. Copy and paste the generated string to share created mazes! Added 'printer-friendly' mode.

Wednesday, April 24, 2013

Added "heat map" view which is a great way to visualize the distance from start of individual cells. It also helps illustrate the differences introduced with the style modifier.

Tuesday, April 23, 2013

Launched! Use the input fields to tweak how the maze is generated. More cool features to come as time progresses!