Jump to content

  • Log In with Google      Sign In   
  • Create Account






The Dawn Age - Dungeons!

Posted by Cerd, in Development 06 April 2013 · 391 views


Hi, I’m Cássio Eduardo Ferreira da Cunha a 21 years old programmer, game designer and founder of this company(Dumont Studios), based in Brazil. This is my second blog post, if you want to know more visit my blog: http://www.dumontstudios.com


Yesterday I finished the dungeon generation. I've never worked on a dungeon generation before, so I had to think for a while and write down what I needed. It ended up working perfectly and have a lot of parameters that I can change to customize the dungeon.


Posted Image
This is a "mini-map" view of the dungeon.
Blue - Walkable.
Yellow - Door.
Red - Wall.


There are 4 types of areas: corridors, rooms, locked rooms and secret rooms. The secret room don't have doors, you may have to break the wall(if there is a crack) or pull a lever.


Posted Image
This is the dungeon generated above. The environment is placeholder, but we will get there eventually.


Next week, I will focus on core gameplay mechanics and pathfinding. Bye.





Welcome to GameDev.Net!

 

What sort of approach have you taken to your dungeon generation?

Thanks!

 

I use a 2D matrix to store the data(25x25 in this case). The algorithm is quite simple:


1 - Generate room at any position and add it to the rooms list
2 - Random a room or corridor from the list(in my case i don't pick locked or secret rooms. Only corridors and rooms)
3 - Pick a wall from the randomed area on step 2(do a few checks) and put a door
4 - Generate a room or corridor for the door(do a few checks)
5 - Place the generated room or corridor on the map and on their respective list
(2, 3, 4 and 5 are inside a loop.)

Of course this is a simplification, but this is the base of the current algorithm. The generation of chests, levers, monsters and other stuff should be easy after this.

This is how the matrix look like:
attachment.php?attachmentid=49320&d=1365
* - Empty space
0 - Wall
1 - Walkable
3 - Door
4 - Locked Door
5 - Secred Door/Wall

July 2014 »

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930 31   

Recent Entries

Recent Comments

PARTNERS