[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
ZDG
Posts: 918
Joined: Sat Jan 02, 2010 12:01 pm
Location: in SlumpEd

Re: [WIP] Randomly Generated Dungeon! (Sounds Needed)

Post by ZDG »

Nash wrote: doors... ...are animated smoothly as they open/close!
Great! Exactly like i said! :thumb:
Nash wrote: Megaspheres are placeholders meant to pinpoint the location of random treasure spawns.
Why not create a score system, where every treasure give points?
If you can apply the script to all levels (or more!) why not use the score as money to buy stuff, like weapons or items? :ugeek:
Nash wrote:WIP enemy model of a skeleton.
Great. :thumb:
Nash wrote:I will need people to test this once lots of monster start running around, though...
/me WANTS TO. :P
Worst
Posts: 115
Joined: Sat Apr 28, 2007 5:29 am
Location: finland
Contact:

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

Post by Worst »

Nash wrote:You know what would be awesome? A recreation of the Mersenne Twister random number generator in ACS and the ability to seed it however you like. :D :D :D

(Probably not possible though since you can't retrieve the system's epoch in ACS...)
..I looked at the original mersenne twister source, but it seemed like a mess to implement (though I could be wrong).. Anyways, I checked out some other random number generators.. And i found out that MT isn't necessarily the best one out there, and that there are some other generators which are simpler to implement, yet still have bigger periods and equal/better randomness.

So I tried porting a few to ACS. (such as xorshift, multiply-with-carry, WELL512..)
I'm not sure if I got them ported 100% correctly though, as there's the datatype differences, etc. But they seemt fairly random to me :P

As for the system's epoch.. I can only imagine this being used for the initial seed value, if it were to be used by some random number generator which has a seed. So in other words, you'd only need this whenever you change the seed.

so.. as you can't return the system time directly with ACS, you would have to resort to one of the following;
  • Include a batch file with your mod

    A batch file could produce a commandline that sets a cvar with the system time.
  • Include a custom launcher with your mod.

    A custom launcher could be neat, if you'd make a lot of user customizable settings,
    such as dungeon generation options / items / monsters / whatever. (This launcher would also set the cvar for the system time in the commandline.)
The good side of either of these is that you get the system time in a cvar, which you could then read with GetCvar().. And the bad side obviously being that its only on game load. (so no restarting from the in-game menu)

What do you think?

EDIT: or you could just use the built-in Random() to have a different seed each game.. :P
Attachments
rng.zip
Random number generators ported to acs (example)
(2.75 KiB) Downloaded 177 times
Last edited by Worst on Tue Apr 27, 2010 6:23 am, edited 1 time in total.
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! (Sounds Needed)

Post by Hetdegon »

I second the score system suggestion, after all, most major roguelikes do keep a ranking based on achievements/treasures/EXP. What reminds me... Are you going to implement EXP levels and such?
User avatar
ZDG
Posts: 918
Joined: Sat Jan 02, 2010 12:01 pm
Location: in SlumpEd

Re: [WIP] Randomly Generated Dungeon! (Sounds Needed)

Post by ZDG »

Great idea!
Oh, nash, if you want to do the treasure system, i can provide some sprites.
User avatar
Hellser
Global Moderator
Posts: 2705
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

Re: [WIP] Randomly Generated Dungeon! (Sounds Needed)

Post by Hellser »

I just tried this out (in DooM 2, didn't see anything about mentioning to use it with Heretic or HeXeN), and it works pretty well. I hope that you can eventually supply more detail in the maps, or load up prefabs as you mentioned earlier. In my opinion, it's worth it!
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

TLDR NO NEW PLAYABLE VERSION YET don't get excited

So I decided to take a break from my zombie survival project because I'm getting pretty burned out by it. I was looking through my other projects and I found this again.

Unfortunately, due to the heavy experimentation while I was actively working on this - and not having fully utilized the wonders of version control - I've somehow managed to screw up the codebase a huge amount to the point where this thing just does not work anymore.

I have several backup folders made during various points in the past (an archaic form of version control at the time, I guess XD) but they're all over the place. However, I'm confident that I can somehow piece this project back together to the point where it last worked enough to be playable (at least, in the same state as one of the previous playable builds that I've released in this thread in the past).

I'm also going to restructure stuff to make use of recently added GZDoom features (like long file names, several new UDMF improvements and things like that) and that will be done simultaneously in the same reconstruction pass.

Finally, to somewhat immortalize this and make sure my efforts won't go to waste, I've made the liberty to open source the project on GitHub:

https://github.com/nashmuhandes/dungeon

If you're interested in its development, feel free to follow the repo, I will keep adding stuff to it and when it eventually gets to a playable state, I will make an announcement. Warning: there is currently nothing runnable/playable or worth looking at in the repo at the time of this post.

As of right now, I'm working on setting up the main libraries as I type this, and will commit in the next few hours... hopefully.

IN THE MEAN TIME... if anyone happens to have one of the playable demos archived somewhere, feel free to reupload them. That'd be cool actually (and might help me in rebuilding this project... or not, I dunno :P).
Last edited by Nash on Thu Oct 13, 2016 2:25 am, edited 1 time in total.
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! [Revived]

Post by Hetdegon »

Nash, do you remember the filename? I know I didn't delete it when I tried it years ago, but who knows where it is nowadays.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

Probably just dungeon.zip or something because the build script builds dungeon.pk3...
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! [Revived]

Post by Hetdegon »

I am not sure which version this is, but it's dated 20100424, I hope it helps.
Last edited by Hetdegon on Wed Feb 17, 2016 9:17 am, edited 1 time in total.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

Wow, thanks! And looks like the souce is in there, too. While the source is far too old for me to just copy and paste it into my codebase right now, it is still quite helpful in rebuilding the project.

In the mean time, if anyone has this lying around (preferrably with the portcullis and start/exit room geometry... I think that was the last version that I released publically) that would be even more awesome. :D
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

Image

So I just tried the last known version that Hetdegon uploaded, looks like it still works in the latest GZDoom build. :O Too bad I lost the super-latest-version, what a waste, it generated prettier dungeon layouts, smoothly animated doors and portcullis that blocked line of sight, correctly placed dungeon starts and exist, etc etc...

I've mirrored the package Hetdegon found on the main post, but I strongly discourage anyone attempt to learn from that code as it's really amateur rubbish. I've started rewriting the entire thing from scratch and using GDCC, I hope to out-do what I achieved in 2010...
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! [Revived]

Post by Hetdegon »

Good luck!
User avatar
Kontra Kommando
Posts: 944
Joined: Mon Jan 20, 2014 6:46 pm
Location: LV-426

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

Post by Kontra Kommando »

This is cool, I love the idea of a randomly generated dungeon. I hope you can surpass what you have accomplished in 2010.

Combine this method with random spawners, similar to the way I made my mod (I.e spawners that serve as environmental decorative generators, and randomize clusters of various monsters from a single decorative actor). Someone could probably make a 32-level megawad in a day.

I could imagine a really cool Hexen mod made like that.
Seidolon
Posts: 463
Joined: Wed Oct 09, 2013 11:11 pm

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

Post by Seidolon »

This is awesome! Mind if I work on a Hexen-styled adaptation of your concept?
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

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

Post by Nash »

The original mod this was made for was going to be fantasy-themed... it would have, if I didn't abandon it and break the engine beyond repair. >_<

I strongly discourage you work off the old ACS... the code is badly written, unoptimized (generates things slowly; I eventually made it much faster but I'm going to have to re-create that) and the rooms and halls don't even look good anyway, as you can see in the image. I'm currently doing a full, modern rewrite, perhaps that would be a better base for you to work off of!
Post Reply

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