I’ve been writing a dungeon generation algorithm which:
- Randomly plots rectangles within a certain radius
- Separates the rectangles so that none overlap
- Selects a certain range of these rectangles, based on total area and ratio
- Collects their center points as an array of Vectors, and
- Runs array of vectors through Delaunay triangulation
At this point, I am left with an array of Triangles.
The final step is to use this data to create a set of corridors.
Other tutorials suggest running this data through an MST algorithm (I assume Prim’s?), so that all points connect to each other only once, and with the shortest path possible.
Does this break my ability to use Prim’s algorithm? How could I even use the data structs I have as input for an MST?
Is an MST even the best option for this?