This is how I would generate a dungeon map for an exploration game.
Core Version(just the generator scripts)
Press enter to re-generate the dungeon. You will have to download the .gmk to mess with the settings.
Advanced Version(with generated floor tiles, and lighting for each room using a particle system)
W,S,A,D to move your avatar around.
All in game objects simply contain scripts that can be found in the scripts folder. You will need some understanding of GML, if you don't I hope you find this to be an advanced example to learn from.
scr_create() is where you can set the number of rooms and how many possible neighbors each room can have.
scr_step() is where all the action is. It's commented out.
It will take some know how to translate the basic version into room exploration. My method is found in the adv version. If you would like to add to this project please post updates here!
1. You can edit the boundaries of how far your dungeon will expand as well as how many rooms in total are produced.
2. you can now use a decimal place to edit the maximum number of neighbors a room can have. So setting max_nbor = 2.1 will allow 3 neighbors 10% of the time, otherwise just 2 for example.
3. If you really want to have the room cells be a smaller size, you can adjust the mask of obj_room to match the width and height you want. that should fix it.
UPDATE: I added the functionality of actually roaming around rooms check out the screenshot.
Edited by StallionTG, 10 October 2012 - 07:33 PM.