MazeMaker
Robert Dell, Pascal Developer
By Robert Dell
8 July 1998
MazeMaker (Pascal source code, project and sample program)
(updated 8/5/98)
The concept of generating a maze is to first create a grid and define exactly how walls, floors and so on are handled. Will the maze have 2 dimensions or 3? Will you have 8 cardinal directions of just 4? Will you go up and down? How many times maximum will you go up/down? How far away will you allow to go up/down? Do you want a minimum of so many rooms in one direction? All these questions must be answered before you even start creating a maze.
Once you create the parameters, you want to then create a data format that will similate one room and a grid of rooms to correspond to the maze you have. Preset the one room to all walls and floors/ceilings and copy that to the rest of the grid.
The way I have it accomplished this is to move to the proper screen location and draw a line on top of the room for the north wall, left side for west, right side for east, and bottom for south. Currently I have it set for 5 pixels wide by 5 pixels tall. The program I have submitted called mazemaker.p shows a simple 2d maze with 4 cardinal directions and automaticly sets itself up the proper size of your screen. The maximum size of the maze I preset with a constant is 800 by 800 and those numbers are simply pulled out of the air and have no purpose in the concept of generating the maze. It's not very easy to leave and offers no easy interface and does it with brute force causing the fastest maze generating routine possible. I'm not trying to win awards for the best user interface but I bet this routine source code will be the core of all future maze generating routines.