For Total Conversions and projects that don't otherwise fall under the other categories.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
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).
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.
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.
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...
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.
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.
@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!
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.
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...