The Daily Click ::. Downloads ::. Engine ::. OSM - Roguelike Dungeon Generator
 

OSM - Roguelike Dungeon Generator
Author: Rob Westbrook Submitted: 11th November, 2009 Favourites:0
Genre: Engine Downloads: 668
Rated:


Edited By Rob Westbrook on 12/21/2009

Edited By Rob Westbrook on 11/13/2009

Edited By Rob Westbrook on 11/11/2009

This is an example of an extremely bare-bones Roguelike dungeon generator. The source is included since I'm nice and it's Open Source Month

It works in a fairly simple way. For each room the generator wants to build, it first scans the room's area to check if it completely falls in an area of dirt. If it does, it loops through again, this time drawing the room itself. If not, it looks for another space. It does this until either the total number of rooms is equal to a certain amount, or if the attempted rooms is equal to another amount (I've found that the number of desired rooms x 10 has a good balance of time vs number of good sized, well placed rooms). Then it drops in the up and down stairs.

After drawing the rooms, it loops through using the Advanced Pathfinding Object carving out corridors between rooms. It should work out that every room is reachable. After the corridors it adds walls around the outside of all room and corridor spaces.

It's also completely scalable. Tile size, number of rooms, min and max room size, frame size, all can be changed by changing Alt Values and graphics, with no changes to the code itself.

Overall it works out pretty nice for about a week's total programming, although it's obviously still missing a hell of a lot like doors, items, monsters, etc...

Hope you enjoy!

EDIT: You'll need the .NET 2.0 Framework to open both the .exe and the source!

Review This Download



 


http://www.mediafire.com/?znn0mlwyyt0 (1.13mb )



Posted by Disthron 11th November, 2009

So this wasn't made with MMF2? You know, you might be bale to use a technique like this to generate random maps for the ray casting object.
 
Posted by Rob Westbrook 11th November, 2009

It was indeed made with MMF2 I suppose that's perfectly possible, although I don't have it so I can't have a mess around. Interesting idea though!
 
Posted by UrbanMonk 11th November, 2009

This is preeeety cool.

Too bad you used the .NET object. I'd much rather it been straight mmf code which would be far more impressive in my opinion.
 
Posted by Rob Westbrook 11th November, 2009

Thanks! Yeah, I know what you mean. I do so like the APO though, and creating a pathfinding engine from scratch is still a little bit beyond my abilities!
 
Posted by Pariah Leviticus 12th November, 2009
Rated :

Very nice, though I could use some comments in the code as I understand about a tenth of it. Maybe I'm just daft.
 
Posted by alastair john jack 12th November, 2009

Pretty decent.
 
Posted by s-m-r 17th November, 2009

Had some trouble with the link, and I'm not able to download. MediaFire reports that it's a 404 error...Any idea what might cause this?
 
Posted by Rob Westbrook 19th November, 2009

It's still working fine for me... Anyone else having trouble?
 
Posted by doc future 20th December, 2009

I'm not able to download this, can you upload another version or see if mediafire has a different share link you can use.
 

 



Author

Favourite



Advertisement

Worth A Click