Log In  

Cart [#pugafufahi-0#] | Code | 2019-02-16 | License: CC4-BY-NC-SA | Embed
23

Inspired by an idea from JW of Vlambeer, I built this dungeon generator.

In short it adds a bunch of rooms on top of each other and then moves them randomly around until they don't fit any longer. Usually this makes for some very nice and organic looking scenes. This version also has a bunch of other parameters like wider door ways, interconnectedness, and decoration among others. The example in this thread randomises these parameters but in the code it is fairly easy to set them up to whatever.

I've tried to document it to a degree, so hopefully it can help out if someone wants to dive into my implementation. It should be said though that I primarily wanted to visualise the process and to look nice, not necessarily be the most efficient data structure. ;)

Have fun and let me know if there are any questions!

P#61963 2019-02-16 23:53 ( Edited 2019-02-16 23:54)

1

This is great!

P#61968 2019-02-17 01:37
1

Well presented :)

Adding a room is like watching a drunk architect that keeps forgetting where things are!!!

P#61979 2019-02-17 13:44

trying to figure out what's going on with the little indicator at the top left... is it like the types of rooms shown?

maybe it's explained in the code and I haven't looked yet?

P#62019 2019-02-18 06:32
:: johanp

Thanks for the positive feedback!

Kavukamari, it is a representation of the parameters that is fed to the generator.

  • chance for big rooms
  • chance for wide doorways
  • chance for additional doors
  • chance for room decoration
  • amount of pre-generated blocks
  • size of pre-generated blocks
P#62020 2019-02-18 06:51

This is great! I'll definitely have a read through the code tomorrow as I still haven't decided how I want to implement procedural generation for the 7DRL challenge, but this looks like a simple yet effect approach.

P#62048 2019-02-18 20:59

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-09-22 17:17 | 0.021s | 4194k | Q:35