[WIP] Randomly Generated Dungeon! [Revived]

For Total Conversions and projects that don't otherwise fall under the other categories.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Nash » Wed Oct 12, 2016 9:39 am

Image

Soooooo I had a small surge of brain energy and rewrote everything from scratch. Layout still looks like shit but what's important here is all the relevant data structures I need are there, and all the API needed to build the dungeon from said data is functional (AKA turning a bunch of numbers in an array into the actual physical map space you can walk in).

This is of course random so each time you restart the map, the layout will be different, for ifninite Radient quest's !!!

I just need to figure out a layout algorithm that doesn't suck ass. The same point I got stuck at years ago, except this time code is 10000x more readable and professional (I hope), thanks to not having to hack with acc.exe's limitations anymore (thank you based DavidPH and gdcc-acc).

It almost just works!
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Patriot1776 » Thu Oct 13, 2016 5:41 am

Is there height variation at present in any generated rooms?
User avatar
Patriot1776
 
Joined: 29 Jun 2008
Location: Moonshine Still, North Carolina Mountains

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Murix » Thu Oct 13, 2016 7:14 am

So is there a public version yet? or you still getting how you like it?
User avatar
Murix
Developing Ballad of Rhinestone
 
Joined: 31 Mar 2016
Location: On my chair

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Josh771 » Tue Nov 15, 2016 1:59 am

I hope you're still working on this! Procedural environments are among my favorite mechanics in any video game.

My favorite approach to dungeon layout is budding, preferably starting with a room in the center of your dungeon and simply adding randomly sized rooms at the edges of existing rooms until you've met your quota. Corridors could be preserved as 1-tile wide rooms, and you can randomly knock out shared walls to create L- and T-shaped rooms - or even punch extra doors through shared walls to create spaces that loop back on themselves.

Of course, my experience with dungeon generation has nothing to do with the specifics of ZDoom. Also, this is probably my first post in... nearly two years? At least one year. So I'm not dead, at least.
User avatar
Josh771
formerly known as SidDoyle
 
Joined: 03 Apr 2013
Location: Elsewhere.
Discord: josh771#7771

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Danfun64 » Tue Nov 15, 2016 9:16 pm

This + Doom RL Arsenal + Doom RPG = ???
Danfun64
 
Joined: 23 Apr 2013

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Dancso » Fri Nov 18, 2016 5:50 am

I might aswell share my way of doing random level generation in case it helps someone.

I used prefabs in my tile-based randomly generated game. I created the prefabs in a custom level editor to define each tile's content, some of which were labeled as connector tiles. The level generator then used these tiles to connect rooms, and those that were left unconnected just get changed into a simple wall.
The layout generator would go from a source room outwards in a clockwise pattern (i used four different connector tiles, one for each direction to make that easier to identify), spawning the current room's branches before moving onto the children and children's children, because that usually resulted in one very long branch whereas other branches from the start point got cut off early (or the room limit would be reached)

I then added a type to various prefabs as start rooms, hallways and exit rooms. I defined a guideline number of how deep the "branching" should go, and only beyond this point would exit rooms have a chance of spawning. A level would potentially generate multiple exit rooms, one would get picked to be the real exit while the others would change their exit triggers into teleporters that take you to other branches or back to the start room to intuitively save time for the player. The only real purpose of the starting room prefabs was to allow as many initial branches as possible, whereas your average hallway rooms inbetween will provide all the variety you want. A healthy mix of corners, hallways and special rooms would do the trick.

For error checking, I basically cycled randomly through prefabs to see if they fit, after a certain number of failed attempts the given connector point would be ignored. If no exit room spawned or there are a severe lack of rooms, the map may get rejected completely.

The real challenge I see in implementing a prefab-based system in doom is in the storage of prefabs. We're talking about dozens if not a few hundred different arrays of integers plus whatever means to add actors inside, it could get pretty daunting to handle in acs files from a management standpoint.
User avatar
Dancso
bow wow
 
Joined: 11 Oct 2006
Location: at home.. Status: lazy like hell

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Nash » Fri Nov 18, 2016 6:12 am

Hey Dancso! Actually, prefabs was what I'd do as a last resort because technically it's the easiest to do. XD If I went that route, I'd probably write a tool to edit and export prefabs as array declarations that will plug right into the ACS. And as you've already predicted, these would just end up being a massive bunch of numbers that will probably not be human-editing friendly... but I don't really consider that an issue (just slap a // Generated by DungeonTool at [time] [date], do not edit by hand! comment at the top of the file :P)

The good thing about prefabs is the dungeon would look more artistic, rather than a bunch of completely computerized rooms and corridors...
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby kodi » Fri Nov 18, 2016 6:43 am

Perhaps one could use rogue-style "sprite art" in the language lump to define prefabs in a human-editable way?
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Dancso » Fri Nov 18, 2016 11:41 am

I see no reason to edit the prefab lumps via text editors - might aswell use a prefab editor hand-made for that, which can display as much information as you could possibly want.

@Nash
I think prefabs are perfectly fine to use, I can barely name any games that use random generation and don't use prefabs of some description. Sucks that technically the number of variations is "limited" but given enough prefabs it really shouldn't matter much. Especially since providing a fresh set of them can completely change the look and feel of the game whereas rewriting complex level generation code is much more difficult, especially if you want to allow users to generate their own content.
Finally, I think anything other than terrain has greater potential to look better when hand crafted.
User avatar
Dancso
bow wow
 
Joined: 11 Oct 2006
Location: at home.. Status: lazy like hell

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Josh771 » Fri Nov 18, 2016 1:16 pm

Just a thought: if you want the hand-crafted appeal of prefabs but want to reduce any potential for monotony or repetition often evident in prefab-based generation, try making nested prefabs.

Basically, you'd have prefab corners, open spaces, doors, etc. and you would build larger... pseudo-prefabs? These larger pieces would make rooms that preserve hand-crafted elements but would ultimately prevent entire room layouts from repeating too often. Might even add random flags when generating a room for things like bilateral or quadrilateral symmetry.
User avatar
Josh771
formerly known as SidDoyle
 
Joined: 03 Apr 2013
Location: Elsewhere.
Discord: josh771#7771

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Ozymandias81 » Sat Nov 19, 2016 8:56 am

@Nash
In case you'll need some good resources to build up a project with this neat RGD thing, you are free to use these resources which I have managed to rip from a pretty unknown abandoned port for Ultima Underworld... Hopefully I'll do something with them in the nearly future though. Keep up the good work!
User avatar
Ozymandias81
Doom is a State of Mind... Out of Control.
 
Joined: 04 Jul 2013
Location: Mount Olympus, Mars
Github ID: Ozymandias81
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Nash » Sat Nov 19, 2016 9:22 am

Ozymandias81 wrote:@Nash
In case you'll need some good resources to build up a project with this neat RGD thing, you are free to use these resources which I have managed to rip from a pretty unknown abandoned port for Ultima Underworld... Hopefully I'll do something with them in the nearly future though. Keep up the good work!


Thanks, although the UW tiles are probably too tiny and low res to be useful. XD

Speaking of UW, I tweeted one of the UW programmers back then when they announced their modern Underworld Unity sequel... he posted a screenshot of him writing a tool that converted the original UW levels into a single mesh imported into Blender. I asked him if he will ever release that tool but he said he's not sure and has to get permission. I guess the permission was never granted...

That tool would have been very useful to do a 1:1 conversion of the original UW levels into Doom or whatever.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: [WIP] Randomly Generated Dungeon! [Revived]

Postby Ozymandias81 » Sat Nov 19, 2016 10:46 am

Nash wrote:Thanks, although the UW tiles are probably too tiny and low res to be useful. XD

Speaking of UW, I tweeted one of the UW programmers back then when they announced their modern Underworld Unity sequel... he posted a screenshot of him writing a tool that converted the original UW levels into a single mesh imported into Blender. I asked him if he will ever release that tool but he said he's not sure and has to get permission. I guess the permission was never granted...

That tool would have been very useful to do a 1:1 conversion of the original UW levels into Doom or whatever.

Uh this is really an interesting info, btw if you check those awful maps inside my project you'll notice that I have found a somewhat lame workaround to have an idea how to build up properly UW maps...
User avatar
Ozymandias81
Doom is a State of Mind... Out of Control.
 
Joined: 04 Jul 2013
Location: Mount Olympus, Mars
Github ID: Ozymandias81
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia with Vulkan support

Previous

Return to TCs, Full Games, and Other Projects

Who is online

Users browsing this forum: No registered users and 9 guests