CaptainLuma/New-Maze-Generating-Algorithm

Different Maze Types Implementation

Opened this issue · 1 comments

Hi, I'm the author of the Labyrinthian library, which specializes in step-by-step generation of various graph-based maze types (e.g., delta, theta, upsilon) using different algorithms. Recently, I integrated your Origin Shift algorithm into my library, and users can now visualize the generation process in this online demo.

In my implementation, I start by selecting a cell (random by default) and perform a BFS from it to create the initial spanning tree (perfect maze). Then, I apply n iterations (n = 10 * mazeCellsCount by default, as per your suggestion in your video).

Your algorithm has truly impressed me. Unlike other graph-based algorithms like Kruskal or Wilson that generate a random spanning tree from scratch, Origin Shift operates on an existing spanning tree and dynamically modifies it. I also find it particularly innovative that directed graphs can be utilized effectively for maze generation, I haven't encountered a similar approach before.

However, Origin Shift does have its limitations. Occasionally, it fails to fully traverse the graph, especially with Delta mazes, even with 10 * mazeCellsCount iterations:
Triangular maze(size 50)

Despite this, I believe your algorithm has significant potential for enhancement or as a valuable secondary post-processing tool.