I'm trying to learn procedural generation technique's. Specifically for dungeons. I started off with a 2D array and I generate my rooms fine. Each room contains wall tiles as seen in the screenshot below.
Right now I use A* to link the rooms together. But this has some paths go straight through other rooms or around rooms. Having done some googling I found this demo which game me the idea of using Delaunay Triangulation to properly connect the rooms without going through already existing connections/rooms.
But how to apply it to my 2D array setup? My initial thinking is that I should think out side of the box (2d array haha) and grab my rooms and create a complete graph from this and then apply the Delaunay Triangulation.
I've never done anything with graphs before. So what I would to know is a) is my thinking correct in creating the graph with all the rooms linked and then to apply the triangulation and b) where should i start?
[small edit]after some more looking around stackoverflow i found this post explaining Graphs more in depth. https://stackoverflow.com/questions/15306040/generate-an-adjacency-matrix-for-a-weighted-graph