- Home /
How to make a Maze with multiple paths and no dead ends?
How would I go about programming a Braid maze in C# (Unity in particular) with multiple solutions?
A Braid maze from what I understand in my brief research is a type of recursive maze which allows loops, meaning no dead ends.
The closest answer I've found is in this thread dealing with how to create more than one successful path, but I can't figure out to combine the two as the examples used in the thread are for "Perfect" mazes.
By these steps you can get multiple successful paths from start to finish:
Subdivide the maze into three sets: Start (intially holding just the start cell), goal (initially holding just the goal cell), and undiscovered (all the rest).
Randomly remove walls between cells in the start or the goal set and cells in the undiscovered set, and move the newly discovered cell to the respective set.
Repeat until each cell is either in the start or the goal set.
Remove as many walls between the two regions as you want paths from the start to the goal.
I need is a step 5. that goes back and deletes all dead ends to turn it into a braid maze and I would be set! (Assuming that the maze size is n * n).
Any help would be seriously appreciated!
Your answer
![](https://koobas.hobune.stream/wayback/20220612120738im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
how does the greedy meshing algorithm work? 0 Answers
Check if all values in a list are equal 1 Answer
Find the least number of bills required to pay for a certain amount -1 Answers