-
1 Attachment(s)
Random dungeon generator
Attachment 11794
I just finished a random dungeon generator. It produces an array containing the X and Y coordinates, the tile type (path, wall, start or end) and tile graphic information of the dungeon.
The random dungeon generation is quite easy. It walks from a starting position until a predetermined number of tiles have been placed and a minimum distance from the starting position has been reached
The tile graphic part is solved by using prime numbers to create unique ID:s for different tile combinations. I did this in a separate editor, which is also included in the example.
It might not be the most intuitive example ever (far from, I guess), but I hope it's useful nonetheless!
The example can be found here: http://www.declared.se/?p=84
-
Looks great. Just downloaded this so I can drool on my feet.
Marv
-
Thanks! Just tell me if you have any questions :)
-
great example ! :) good work Yima!
-
Is there anyway to get a SEED number after generation?
The dungeon generator extension let you put in a seed. This would let you travel between dungeon rooms more easily I think since you could store the values
-
That would be practical. For now, it's certainly possible to save the dungeon layout to a file (that is the main point of the generator), but I guess you are looking after something like the seed in Minecraft or Cubeworld, where you can enter a seed that controls the "randomization". For now I have no idea how to do that, but I am really interested in learning how to do it, so I will get back to you if I come up with a solution!
Edit: After some thinking I feel that I might have come up with a basic solution to creating a seed based generation. I have to work tomorrow, but I will modify the generator as soon as I can.
-
Awesome. I have the dungeon generator plugin installed and it has a seed option, but I have no idea how the logic works
-
Nice work, It can be very usefull, thx for your work Yima
-
-