Jump to content


Photo

Random Dungeon/instance Generator


  • This topic is locked This topic is locked
10 replies to this topic

#1 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 04 September 2007 - 06:03 PM

Greets.

I ran across this random Dungeon Genrator site - and I think it would be quite beneficial if we could "port" the CGI over to GML. It'd be an effective way to create GMDungeons (or instances for any era).

Site:
_Dungeon Generator_
Source Code:
_Source_
Info on above:
_Info_

GM Workings:
Once the the random maze is generated - it must then be converted into a 2D room. (2D rooms are the foundation of GM3D anyway - so it should work nicely for both.) Note that a lovely 2D map is nicely generated with this code.

Option to define each "entity" (monster/ treasure/ item/ trap/ etc) as a pre-defined GM_Object.

Option to define the graphics via sprites and backgrounds.

Maybe even make an Extension for D&D usage?

==========================

This would be a great benefit to entire GM community - specially anyone wishing to add replayability to their instances.

Here are some OTHER Maze source codes - that might prove helpful:

Mazegen1 [Java] Source Code Available.
Mazegen2 [Javascript] Source Code Available.
Mazegen3 [ASP] Source Code Available.

Sample 2D Generated Instances:
Small
Medium
Large

Note: Each time you click them a new instance is generated. :)

Edited by SSNautilus, 21 September 2007 - 06:39 PM.

  • 0

#2 beam

beam

    GMC Member

  • New Member
  • 29 posts

Posted 11 September 2007 - 11:34 AM

I made a random maze/dungeon generator and uploaded it to 64Digits not too long ago. Here is the direct download, and this is the 64Digits page for it.

It divides the dungeon generation into a few steps. First, it digs a random maze. If you want, you could stop there (if you're making a maze game). Then, it randomly hollows out some rooms, giving it a more dungeon-like feel. Finally, it has a function called maze_trim, which removes dead ends according to sparseness. If sparseness is set high enough, all dead ends and empty passages are removed, leaving only rooms and the passages that link them together.

I'm using it in my roguelike/dungeon crawler right now, the homepage of which is here.

Edited by beam, 11 September 2007 - 11:43 AM.

  • 0

#3 Sinaz

Sinaz

    MCP Killer

  • GMC Elder
  • 2751 posts
  • Version:GM8

Posted 11 September 2007 - 06:18 PM

Maybe even make an Extension for D&D usage?

<{POST_SNAPBACK}>

Do you mean drag and drop... or Dungeons & Dragons?
  • 0

#4 Zezuken

Zezuken

    AKA: Warriorccc0

  • GMC Member
  • 2799 posts
  • Version:Unknown

Posted 12 September 2007 - 12:33 AM

well seeing as he wouldn't use a extension for dungeons and dragons to make random dungeons, you'd think he would mean drag and drop..
  • 0

#5 Sinaz

Sinaz

    MCP Killer

  • GMC Elder
  • 2751 posts
  • Version:GM8

Posted 12 September 2007 - 02:50 AM

well seeing as he wouldn't use a extension for dungeons and dragons to make random dungeons, you'd think he would mean drag and drop..

<{POST_SNAPBACK}>

Um... I guess... but, you know... the dungeon generator linked in the first post was developed to aide in dungeon and dragon games. So he could have meant an extension designed for creating Dungeons and Dragons applications. :P
  • 0

#6 SSNautilus

SSNautilus

    S.S.Nautilus

  • New Member
  • 137 posts

Posted 16 September 2007 - 11:41 AM

D&D = drag-n-drop (pun intended)! :D

However, as pointed above - it can be used for ANY scenario including sci-fi, etc. The purpose is to achieve randomly generated instances - which are appropriately populated with bosses/npcs/loot/treasures/traps/etc (with appropriate sprites/bg_gfx/tiles) and have a viable solution and appropriate player-level challenges. (Remember "Captive"? It came with 65000+ levels!) Which basically means unlimited replayability potential - instead of pre-coded rooms.

Posted Image
CAPTIVE - The award-winning cult-classic futuristic RPG - with the famous briefcase that let you control 4 droids.

The 1st post link also has further links to:
NPC Generator
Town Generator
Treasure Generator

Use these as a study-guide - all can be adapted for any genre usage. Please note that the Dungeon Generator generates a beautiful 2D Map (could easily be converted to a 2D GM Room).

Edited by SSNautilus, 20 September 2007 - 09:34 PM.

  • 0

#7 ashsashs

ashsashs

    GMC Member

  • New Member
  • 240 posts

Posted 02 October 2007 - 05:47 AM

I made a maze generator. Once the map is generated an AI type thing goes through and checks that it is possible. If it is not possible then it detects the best block to remove to make it possible but still challenging. click here to see my site. If the link is broken then please pm me.
  • 0

#8 mechanikos

mechanikos

    GMC Member

  • New Member
  • 453 posts

Posted 06 October 2007 - 08:28 PM

I highly recommend beam's maze generator. However it will only ever generate two rooms, probably because line 9 reads

for (rc = 0; rc < 2; rc += 1) {

when it should read

for (rc = 0; rc < argument0; rc += 1) {

  • 0

#9 cyberdudequestor

cyberdudequestor

    GMC Member

  • New Member
  • 378 posts

Posted 15 October 2007 - 07:58 PM

random mazes rule. Now just make it more complicated so you can generate an entire space ship, city, etc. with it then add aliens and predator for the ultimate in combat and replay value XD

just generate actual places in a procedural way, and use this to start.
  • 0

#10 Indecom4000

Indecom4000

    GMC Member

  • GMC Member
  • 1579 posts
  • Version:GM:Studio

Posted 27 October 2007 - 08:08 AM

Okay, so by far the best example is Beam's maze generator. I've taken the time to look at it a little bit, but i havent dug into the code of it very deep. Though it is the best, it can be vastly improved upon. From what i have seen of it all it works with is cells, and either sets them to 0 or 1, a path or a block. This in its current state will only work well with rogue like games, or gauntlet types.
What this really needs to be completely usefull is to not just set the cells to pat or block, but to set the four cell boundaries to either wall, open, door, secret door. This way you can have rooms that are shut off, with maybe a hallway or two leading into it, and some doors, instead of every touching cell leading straight into it like a cave instead of a dungeon. I'll take a closer look at the source of beam's example and some of the sources available online and see if i cant get the results needed.
  • 0

#11 Longdanzi

Longdanzi

    GMC Member

  • New Member
  • 62 posts

Posted 27 October 2007 - 11:11 AM

I one made an example where a block would randomly move around at high speeds and dig out a levl from amongst other wall objects. I later added a rom system where a certain amount of rooms would appear depending on the room size.I put this all together and I was able to create a random level.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users