Randomized Dungeons

I wrote a little dungeon maze generator using randomize Prim’s algorithm in Ruby.  The snippet below is the algorithm itself and works off of any sort of walls/rooms combo as long as it’s valid.  This should also work in hex or even a 3D maze since floors and ceilings are effectively a wall pair.

Screen Shot 2017-04-19 at 6.11.26 PM

I’m looking to port this over to my new game, but wanted to prototype it in Ruby.  I think I should add some variety by dropping rooms at random on a given size.  This piece will work, but my room and wall generators will need some tuning.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: