I need a random dungeon generator code.

The place for chatting and discussing subjects unrelated to Wesnoth.

Moderator: Forum Moderators

Post Reply
showeringeyes3
Posts: 1
Joined: February 27th, 2015, 3:06 pm

I need a random dungeon generator code.

Post by showeringeyes3 »

Hello,

I'm using gamemaker from y0y0games

and I'm trying to create my own personal dungeon crawler game.

Can anyone please teach me or show some tutorials about random dungeon creations??
As the winterwyvern flew above, Lina was frozen!
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: I need a random dungeon generator code.

Post by Dugi »

Hello,

I have written a C++ based world generator that works quite well for dungeons (not quite well for exterior areas so far). It's highly customisable, you can make some parts very strongly random and other parts exactly as set. It also generates the dungeon on the fly, so if you set it so, you can just go one way and keep entering new parts almost endlessly (well, there is currently a bug limiting this, but that's just a bug, not a design limitation). Populating the dungeon is enemies is strongly unfinished.

If you want, I can send you the source code and some configuration files I have so that you could see how does it work. There is a lot of code unrelated to the terrain generation, so it's not an optimal tutorial, but I don't know of anyone making something similar (Battle for Wesnoth terrain generators are usually for exterior).
Andrettin
Posts: 189
Joined: September 2nd, 2013, 5:40 pm
Location: Vienna, Austria

Re: I need a random dungeon generator code.

Post by Andrettin »

In case you are still looking for a random dungeon generation algorithm, this is a nice tutorial:
http://www.roguebasin.com/index.php?tit ... _Algorithm

And in this file you can find the random dungeon generation algorithm I used for Wyrmsun (function GenerateRandomDungeon).
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: I need a random dungeon generator code.

Post by Dugi »

Don't bother replying, the guy last visited the forums when posting (check his profile). I invited him to send me a PM and he never sent me anything.
Andrettin
Posts: 189
Joined: September 2nd, 2013, 5:40 pm
Location: Vienna, Austria

Re: I need a random dungeon generator code.

Post by Andrettin »

Dugi wrote:Don't bother replying, the guy last visited the forums when posting (check his profile). I invited him to send me a PM and he never sent me anything.
Ah ok, well, thanks for the heads up :)
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: I need a random dungeon generator code.

Post by Iris »

Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Post Reply