Maze Algorithms (2011)
jamisbuck.org
jamisbuck.org
I implemented several of the algorithms for my Rust maze generation tools (https://github.com/animate-object/mazes, https://github.com/animate-object/maze-cli), (and the game I built on top of them https://github.com/animate-object/followed)
IMO, the recursive backtracking algorithm looks the best, and I'd probably use that if I were to ever return to this quick little project.
https://github.com/FransFaase/MazeGen
Because this program is for my own experiments, I simply modify the 'main' function if I want to change some parameters or select another combination of algorithms. See 'all_tests' for some examples of how the various methods can be called.
I peeked at the javascript and it looks like when you hit `run`, it is calling the step at a setInterval (if I'm reading this right, as fast as the browser can call run)
So at the end of each run call, the interpreter figures out which setInterval timer to execute next and has the chance to pick other mazes. (I don't know much about how the JS engine resolves which "not quite thread" gets run next when there are multiple candidates)
So if you want really random maze shapes, sprinkle random points, then use voronoi to get a topology, then use backtracking on that. Your maze will be built out of randomly shaped polygons.
BTW, what do you need the maze algorithm for?