Maze Generator: 2D recursive backtracker

Monkey Forums/Monkey Code/Maze Generator: 2D recursive backtracker

AdamRedwoods(Posted 2013) [#1]
2D Maze Generator
recursive backtracker

- creates the long and windy maze, fewer branches
- guarantees a solution
- also uses a minimum step check to keep complexity up
- optional step-through
- repeatable using Maze(w,h,seed)
- instant game! fun for the whole family! ;D




Tri|Ga|De(Posted 2013) [#2]
Is this playable?
If yes how do I do it.


Gerry Quinn(Posted 2013) [#3]
Just copy the lot into a Monkey file and run it (HTML is fastest)

It seems to generate some disconnected areas, it would be worth while detecting and removing those. But a nice maze, in general.


Halfdan(Posted 2013) [#4]
Is this playable?
If yes how do I do it.

Take a screenshot, print it then you will just need a pen

Lots of fun!


AdamRedwoods(Posted 2013) [#5]
It seems to generate some disconnected areas, it would be worth while detecting and removing those.

updated.

p.s. this could be enhanced to create "rooms" and then you have a nice D&D map.


impixi(Posted 2013) [#6]
Nice. You inspired me to post my own updated maze/dungeon generation code here in the archives. :)