[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 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.
User avatar
Chex Warrior
Posts: 3
Joined: Tue Apr 13, 2010 8:59 am

Re: [WIP] Randomly Generated Dungeon!

Post by Chex Warrior »

Now if there was only a way to make randomly generated items you could make the real Doom roguelike.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon!

Post by Nash »

Just popping in for a quick update...

carlcyber has written a very nice tool that automatically generates the UDMF map to be used for the dungeon, and I can expand it as large as I want (within ZDoom's limit of course).

(FYI, a 256 x 256 dungeon map generated a 53 MB UDMF WAD file :P. It also crashed the internal node builder. Gah I guess I can't create large dungeons...)

Also, internally, the code has changed tons and is very flexible. I've been working on all kinds of functions to help with the dungeon creation. Changing cell textures, placing things in the middle of cells, wall and corridor building functions that check whether they spawn successfully or not, functions to place doors... too much to list, but I feel that I've come to the point where the engine is armed with enough tools to build a dungeon.

Now all it needs is the actual random dungeon generating algorithm itself. This has been bothering me for days... ever since I started this project, I just couldn't come up with an algorithm that produces nice looking dungeons.

I'm going to get started on that now. Hopefully I can come up with something decent.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon!

Post by Nash »

Image

New version! Changes include...

1) Doors! They don't spawn at the correct angle yet, and well obviously they are dummy sprites as of now. Doors will be models. I won't use traditional Doom-style doors for technical and aesthethic reasons.

2) Dungeon layout now looks good, thanks to my copy and paste efforts an example algorithm written in Java found at: http://roguebasin.roguelikedevelopment. ... _Algorithm

I'm still not entirely happy with it... it currently has no concept of rooms (attempting to store rooms into my existing rooms list doesn't seem to work with Mike Anderson's algorithm). Also, sometimes, doors spawn next to each other. I'll figure that out later.

And some other bells and whistles.

Still no exits yet though. Next on my to do list:

1) Proper door angles, models
2) Spawn random decoration
3) Spawn random monsters!

[EDIT: Download removed]

Can users with lower end systems please try this out in GZDoom and tell me what kind of FPSes you're getting? Thanks.

EDIT: Mini update. Same link to download new version.

1) Added door model which I whipped up in 5 minutes in 3ds Max
2) Doors spawn in correct angle
3) Pressing +use on a door will remove it - this will eventually evolve into a complete door system with open/closing, obstruction checking so door can only close when nothing is standing in its way, etc

Still need to figure out how to make sure doors don't spawn next to each other...
Last edited by Nash on Sat Apr 17, 2010 8:32 pm, edited 1 time in total.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon!

Post by Nash »

A small update.

1) Doors are now fully functional. They open, close, and check for obstructions. The only thing they won't ever do is block line of sight, and I'm going to leave it at that - the final door models will have see-through features like small gratings or windows, to reflect this limitation. To open them, just touch them. You can also use the use key. Pressing the use key while a door is open will manually close it. Beware, monsters are also able to open doors...

2) Crude door open/close animation. :P

3) Monster placement! Give it a try.

I'm still waiting for performance feedback. How is it running for slow computers? I need to know. It doesn't hurt my i7 even one bit and I hope it is the same for most users.

Download link is in first post.
User avatar
Hetdegon
Posts: 320
Joined: Sat Oct 30, 2004 12:55 pm
Graphics Processor: nVidia with Vulkan support
Location: Chireiden

Re: [WIP] Randomly Generated Dungeon!

Post by Hetdegon »

Wow, just WOW. The fact that it uses internal zdoom code (hence portable to whatever platform you can run zdoom into) is what makes it incredible.
I am used to Oblige maps for my random play, but this has an even raw-er roguelike (older angband or nethack) feel to it. If you make some facilities to upgrade equipment and such (could be possible making several levels of armor and weapons and limited inventory...decorate copypaste with some tweaks) and the self-contained Doom Roguelike is born.
I planned to do something like that "decorate copypaste" some time ago but got into something else first, if you ever want to discuss let me know, I can even do a quick sample code as proof-of-concept.

...
It's like DoomRL but reversed, what an amusing thing.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon!

Post by Nash »

I will most probably reuse the inventory system from my custom grid-based inventory system. With that system, it is possible to create a huge amount of items.

Where are the FPSes, people!? :P
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Enjay »

It seems to be working very well for me. With my system being i7 too, I don't suppose you'd expect it to be running badly though. It's pretty impressive stuff so far.

I'm intrigued to know what the game is doing when the % counter is incrementing at the start. Is that a genuine and accurate reflection of progress?
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Nash »

Enjay wrote:I'm intrigued to know what the game is doing when the % counter is incrementing at the start. Is that a genuine and accurate reflection of progress?
Yes. There is an "object" count that determines how many "objects" (in this engine's case, rooms and corridors) are to be created.

A room has a 75% probability to be created, while a corridor 25%.

This is further complicated by the fact that if something cannot spawn, it'll start the loop from the top again (also resulting in the number of objects being created not incrementing).

So why is it slow? Runaway scripts. I HAVE to stick in a delay(1); in the loop, otherwise the script will fail to complete.

I know it's annoying, and trust me, it is, even more so when I'm testing. It gets even slower when the total dungeon size increases...

There are probably ways to optimize the code to make the generating process a little faster but that's kinda out of my league right now I think.
User avatar
Chronos
Posts: 170
Joined: Tue Dec 30, 2008 1:58 pm
Location: Somewhere in your nightmare...

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Chronos »

Wow pretty interesting work Nash.Could you post some in-game screens to us?
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Nash »

I don't know... it doesn't look all that hot in-game YET because most of the dungeons are empty and monotonous.

I'll post in-game shots once I get decorations and room themes (different textures for different rooms) implemented into the engine.
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by InsanityBringer »

for performance, it runs perfectly on my ancient computer, in both Zdoom and GZdoom (the important one)
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Nash »

Good to know. Time to get CRAZY with the dungeon features then!
User avatar
Chronos
Posts: 170
Joined: Tue Dec 30, 2008 1:58 pm
Location: Somewhere in your nightmare...

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Chronos »

Tested it out.Pretty good project would like to help you working at it.
Also good thing Nash to do is to make it for coop for 2-4 players.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Nash »

Yeah, coop support is definitely planned. It would be fun to romp through the dungeon in coop.

I'll also implement something like in Diablo where the more players there are in-game, the stronger monsters get.
User avatar
Dancso
Posts: 1906
Joined: Wed Oct 11, 2006 10:39 am
Location: at home.. Status: lazy like hell

Re: [WIP] Randomly Generated Dungeon! (Testers needed!)

Post by Dancso »

Epic.

I noticed that all monsters will hear your attacks, because the doors don't actually block sound.. it's a bit bad to have em all come over to one room, so you might want to keep that in mind. I'm not sure if sound blocking can be done on the linedefs along the doors, but it would be my first idea to check.

You could also try and have some of the bigger square rooms extended by other rooms, so it doesn't look completely rectangular.. or even generate rooms that aren't box shaped.

It's a bit hard to navigate through the place without switching to the automap every 5 seconds, but I guess not much can be done about that besides some additional content for the rooms.

It would be also interesting to perhaps see a top-down view from an angle, with a camera floating high, and the sectors having "no ceiling" (actually just so tall that they wouldn't be visible)

I'm pretty sure that the generation code can be fixed so that it would finish in the blink of an eye. :)

Keep going, awesome work so far!
Post Reply

Return to “TCs, Full Games, and Other Projects”