If the graph contains loops, then there may be multiple paths between the chosen nodes. If the subgraph is not connected, then there are regions of the graph that are wasted because they do not contribute to the search space. The purpose of the maze generation algorithm can then be considered to be making a subgraph in which it is challenging to find a route between two particular nodes. This predetermined arrangement can be considered as a connected graph with the edges representing possible wall sites and the nodes representing cells. I'm available for questions if you have any.Animation of graph theory based method (randomized depth-first search)Ī maze can be generated by starting with a predetermined arrangement of cells (most commonly a rectangular grid but other arrangements are possible) with wall sites between them.
DUNGEON MAZE GENERATOR ALGORITHM HOW TO
*This only applies if you are not using views and wish the maze to take the whole room without looking stretchedĪ simple tutorial on how to create one of the algorithms in GameMaker: project was developed completely by me, but it was made possible through these tutorials: In the project below there will be additional content, as tiles, objects and rooms, in order to provide examples on how to use the scripts. The tool is composed of 3 scripts (one for each algorithm) and some macros.