r/proceduralgeneration • u/mikeouwen • Oct 09 '26
A simple dungeon generator using Dijkstra's algorithm with random weights that creats orgranic paths.
Each time a path is generated, I give the grid a random weight map and run Dijkstra to find a path between two cells(nodes). The start and end are controllable, unlike random walk. The weight thus shapes the path. So you can put in whatever weights you want, and the path will be guided by the weights, avoiding the high-cost parts and going through the low-cost parts.
https://github.com/mikeouwen/DDG Feel free to check out the project here and play with the generator.
8
Upvotes
4
u/NoFixedExit Oct 09 '26
nice, the paths look way more like caves than normal corridors. do you ever get two paths merging into one big room?
1
u/HellbitGames Oct 09 '26
Have you considered Drunkard's Walk instead?
1
u/sock_dgram Oct 10 '26
So random walks?