ARogue Development Begins

ARogue, a RogueLike but not. ARogue is being developed for Android using the LUA based Gideros framework. Development has been underway for about a week now.

A RogueLike needs procedurally generated dungeons so I read quite a few articles about dungeon generation. Some of my favorite ones were..

FutureLabs general overview of dungeon generation methods

Vasuman Ravichandrans BSP explanation (interactive)

Bob Nystroms neat technique (interactive)

NOTE: I had not read all of those articles before embarking on my journey, if I had then I might have gone down a totally different path.

I decided to make my own BSP like system to generate my dungeons. Partitioning takes place like a BSP but it doesn’t use any tree stuff, just trusty old LUA tables.

So currently my method of generating dungeons is like so..

  1. Subdivide space and mark any partition smaller than 4×4 as dead.
  2. Create a randomly sized room in each partition that is not dead.
  3. Loop through all rooms creating hallways from the center of one to the center of the other.
  4. Cull hallways that were created wider or taller than 1 cell (configurable).
  5. Crawl edges of rooms and create doors where the edge touches a hallway.
  6. Cull extraneous doors.
  7. Remap cells to tiles (using 8-bit) tiling method.
  8. Remap long hallways (configurable).
  9. Generate door information for each room.

Here are some pictures of some randomly generated dungeons. The dungeons are on a 16×16 grid, with 4 iterations of partition subdivision. The numbers are tile numbers used for when the dungeon is rendered later. The left image is the “vanilla” dungeon. The right image is the result of remapping long straight lengths of hallway. These ones look way nicer.  The green lines show the segments of hallway that have been remapped. The yellow lines are obviously doors.


I’m pretty happy with how it is working currently. My next task is to go over the code so far and tidy it up.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s