Archive for April, 2017

Randomized Dungeons

Posted in Development, Software, Video Games on April 19, 2017 by osake

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.