Maze for Rouge-likes


I have been working on a "Rouge-like" maze program for the past year and half.  Granted, most of the time is off the project, more so than on the project.  Basically, I have worked on it when I had available time away from my normal day job, family life and my secondary Computer Support/Consulting/Programming paying jobs.

One of the first hurdles to creating a Rogue-like is random maze generation.  There are a multitude of ways to generate "mazes" and they are all good.  However, they tend to be lots of hallways and very few rooms.  I wanted to generate "extremely large" mazes with lots of rooms connected by short and long hallways with some deadends and of course multiple-paths from the entry (up staircase) to the exit of the level (downstair case)

After studying different methods of generation of mazes, I decided to take a completely unique approach.  I sat down with a sheet of graph paper and started generating a random maze map by hand.  I took careful notes on the process I employeed and then sat back with the results to determine if there was a way to mimic the process via programming logical.  With a few tweaks and a couple of revisions, I ended up with a program that provides the following types of maps. 

Just Click on an image to see a full size version of the map


Moderate Size


Medium Size


Large Size

Level_11.maze (Small)

Small Size

Level_19.maze (small)

Small Size

Level_31.maze (really large)

Large Size

As you can see, the program I came up with allows for lots of rooms, connecting hallways, deadends, multiple paths through the level (so it is possible to miss the really good treasures).  The sizes of the map vary based not only on entered specifications but also due to the variability of the path ways.  One of the things I do is eliminate all of the sections of the randomly generated dungeon that do not connect to the section that contains both the Entry (up staircase) and Exit (downs staircase).  You can see this by the large areas of the "Empty" golden brown space on the maps.  The # represents Walls and the grey/gray areas are the dungeon floor.

The only problem I have is that there are cases where the program "hangs up" when trying to complete the "path finding" routine between the up staircase and down staircase.  Once I get this problem solved, then I am looking at releasing an .EXE version or .DLL version that others will be able to use in their programs without having to write their own code for generating dungeon maps.

Over the course of the next couple of months I will probably look at trying to put together a full tutorial on coding the Path Finding portion of the program and then maybe delve into the actual room/hall generation routines.  Not sure how much of my "secret" i want to share.

Until next time, may the games begin.


P.S. Don't forget our sister site devoted to Flash and In-browser games.

The domain is  registered by currently has over 1,500 games.  New content added daily.  Something for Everyone.

Check it out today!

Add a Comment