[MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

Post Reply
User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

[MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Complex highly randomized and very customizable dungeon generator for three-dimensional multi-layered roguelike dungeons, including rooms, staircases, bridges, artificial caves with flora and other things in them, and a final treasure room. Doesn't just randomize dungeon layout but also which materials are used for every individual part of every level and lots of other things to make sure the dungeon doesn't get boring.

Features rooms with different sizes and layouts, corridors, caves with water or lava or cave biomes in them, bridges where the dungeon cuts into caves, staircases, a treasure room at the end, gold pools, snowy frozen levels, and a bit of a labyrinth challenge to traverse.

Image

It includes items that you can use to spawn your own customized dungeons in creative mode (see here for documentation) as well as natural dungeon generation (which you can deactivate if not desired).

It also has ways to add your own functions to modify how dungeons are generated and look like as well as a way to register spawn tables for mobs to spawn in dungeon rooms (though these are poorly documented).

It doesn't add any new blocks or items that'd be obtainable in survival mode and therefore doesn't come with "node bloat".

Relevant links: Other Info:
  • License (code): AGPL 3.0
  • License (media): CC-BY-SA
  • dependencies: sfinv, default, doors, flowers, markdown2formspec, biomeinfo
  • optional dependencies: bucket, stairs

Some additonal images to give you more of an impression: Image
Image
Image
Image
Image I hope you like it :)
Last edited by Phii on Wed Apr 26, 2023 16:42, edited 5 times in total.

Chem871
Member
Posts: 999
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [MOD] Randungeon (highly randomized dungeon generator) [randungeon]

by Chem871 » Post

Phii wrote:
Thu Jan 12, 2023 22:20
Image
A floor like that will be stolen for sure ;)
What is SCP-055?

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized dungeon generator) [randungeon]

by Phii » Post

Chem871 wrote:
Tue Jan 17, 2023 15:45
Phii wrote:
Thu Jan 12, 2023 22:20
Image
A floor like that will be stolen for sure ;)
Only the treasure room complex on the final dungeon level has this type of floor/walls/etc (depending on randomness) so i suppose it's kinda in-theme to be stolen?

(tho tbh i completely forgot that gold blocks are valuable and not just mundane deko when i coded my mod 😅)

User avatar
Tarruvi
New member
Posts: 6
Joined: Sat Feb 18, 2023 12:09
IRC: Tarruvi
In-game: Tarruvi

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Tarruvi » Post

They look pretty cool, although. The latest release on CDB is maybe bugged, the dungeons never seem to spawn and the client eventually stops responding.

Edit:
I just re-read the mod desc and I waited for the game to start it's normal processes. The mod works, I'm seeing the dungeons generate. One issue is that there are Error messages referencing that some block cant be retrieved. Besides that and the generation taking about 1-3 minutes to generate, the dungeons are spectacular.

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Tarruvi wrote:
Mon Feb 20, 2023 07:19
I just re-read the mod desc and I waited for the game to start it's normal processes. The mod works, I'm seeing the dungeons generate. One issue is that there are Error messages referencing that some block cant be retrieved. Besides that and the generation taking about 1-3 minutes to generate, the dungeons are spectacular.
sorry for the late reply; i saw your comment and your review on contentDB (https://content.minetest.net/threads/4336/#reply-12764) but i didn't find time to reply until now

in your review you said:

> I would like to see some workaround where segments are generated a few steps at a time, to allow you to play and not have to wait around for any given dungeon to load all at once.

which is an appealing idea, but there are some issues that stop me from implementing this:
  • the bubble caves (without their biome interior, tho) are generated as a first step before the rest of the dungeon, without following a top-to-bottom level generation order (which is relevant to give their distribution true randomness), and their generation actually is what takes a big chunk of the time that generating the dungeon takes, and this overhead is something that can't really be split into separate generation segments from top to bottom
  • generating the dungeon in separate segments from top to bottom with small pauses in between to let different mods execute code only works if the assumption that the player would enter the dungeon from the top holds true, which depending on which other mods are installed might not be the case. even worse, if we allow other non-mapgen code to be executed between chunk generation and finished dungeon generation we'd greatly increase the potential for things to happen that either get destroyed by the dungeon (e.g. the player doing lua-powered things akin to crop farming in the new chunk that then get overwritten by the dungeon), or result in weird things when the dungeon is generated (e.g. mobs spawning in caves that then get stuck in dungeon structures)

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Tarruvi wrote:
Mon Feb 20, 2023 07:19
I just re-read the mod desc and I waited for the game to start it's normal processes. The mod works, I'm seeing the dungeons generate. One issue is that there are Error messages referencing that some block cant be retrieved. Besides that and the generation taking about 1-3 minutes to generate, the dungeons are spectacular.
sorry for the late reply; i saw your comment and your review on contentDB (https://content.minetest.net/threads/4336/#reply-12764) but i didn't find time to reply until now

in your review you said:

> I would like to see some workaround where segments are generated a few steps at a time, to allow you to play and not have to wait around for any given dungeon to load all at once.

which is an appealing idea, but there are some issues that stop me from implementing this:
  • the bubble caves (without their biome interior, tho) are generated as a first step before the rest of the dungeon, without following a top-to-bottom level generation order (which is relevant to give their distribution true randomness), and their generation actually is what takes a big chunk of the time that generating the dungeon takes, and this overhead is something that can't really be split into separate generation segments from top to bottom
  • generating the dungeon in separate segments from top to bottom with small pauses in between to let different mods execute code only works if the assumption that the player would enter the dungeon from the top holds true, which depending on which other mods are installed might not be the case.
  • even worse, if we allow other non-mapgen code to be executed between chunk generation and finished dungeon generation we'd greatly increase the potential for things to happen that either get destroyed by the dungeon (e.g. the player doing lua-powered things akin to crop farming in the new chunk that then get overwritten by the dungeon), or that result in weird things when the dungeon is generated (e.g. mobs spawning in caves that then get stuck in dungeon structures), or that interfere with normal dungeon generation (e.g. spider mobs spawning and adding nets that interfere with dungeon generation, or nssb generating a building via ABMs that half-overwrites dungeon structures and hald gets overwritten by new ones, or other abm powered mapgen things). basically what this boils down to is that there is imo a good reason why minetest doesn't do parallel execution of lua code that interacts with the world, and splitting generation of one big structure up into several steps with code execution in between has the potential to create chaos for the same reason.
  • all of this gets even more complicated when you consider the possibility of server restarts/shutdowns during generation
  • there are two ways to reduce the issue you mentioned (split generation into separately executed steps, and trying to optimize for speed by using vexelmanip in the on_generate callback). both would partially require creating different code for dungeon generation that happens on chunk generation, and dungeon generation that's done using the tools the mod provides for it, for things here both currently use the same code, and that'd be super hard to do organize and maintain and make the codebase even bigger, and wayyy harder to maintain for me, and harder to read and understand for others (which is a petty bc i want other ppl to be able to understand and replicate everything i did by reading the codebase).
  • basically all of this boils down to me not having had intended to even add on_generate generation to the mod until it was almost done, so that part is mostly an afterthought, which is probably at least partially responsible for why it's so slow (hence the disclaimer in the mod description)
TL;DR having some minutes of wait&blocking whenever a new dungeon gets generated will probably always be a downside of randungeon, unfortunately; one thing i can suggest you to do if that becomes too much in the long run is to disable natural dungeon generation once you are content with the number of dungeons in your world, or to reduce the spawn rate of them (both possible in the settings), but iÄm afraid apart from that there's little i can do to fix this issue given my limited resources

also ! thanks a lot for the praise you had for the aesthetics of my dungeons :)

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Blockhead » Post

If players want a more uninterrupted adventure with heavy mapgen mods like randungeon, it may be a good idea to set some computer time aside to pre-generate a lot of world space. You can use the emergeblocks command. For example, to emerge 2 km out in each direction to a decent depth and height from 0,0, you can run:

Code: Select all

/emergeblocks (-2000,-64,-2000) (2000,128,2000)
I don't know the exact y-levels of randungeon and your mapgen may produce areas higher than y=128, so tune your parameters accordingly.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Blockhead wrote:
Fri Apr 14, 2023 03:12
I don't know the exact y-levels of randungeon and your mapgen may produce areas higher than y=128, so tune your parameters accordingly.
I'd have to look into the code for the specific y value but i think anything that entails y=0 (e.g. from y=-50 to y=50) should suffice, bc when such a chunk gets generated randungeon throws the dice on whether to put a dungeon into it, and if so it triggers generation & loading of the area that should contain the dungeon on its own, so dungeons reaching into ungenerated territory or only getting generated partially bc of a suboptimal choice of area isn't smth that can happen.

Also thanks, that's a good suggestion :)

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Update (v1.2.0):

- for mapgen v6: Whether the first level level of the dungeon is frozen (as in, pools are frozen & bubble caves are snowy) now depends on whether the dungeon generated in a snowy biome (this has already been the case for all other mapgens so far, but now it's also supported in v6) (this does not influence whether any of the lower dungeon levels are frozen)

- bugfix: the upmost level of the dungeon being frozen no longer turns the water of the surface(!) ocean into ice

- new dependency: biomeinfo

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Bugfix Update (v1.2.1):

- bugfix: i fucked up in an earlier version of randungeon (i think it was the last update) and accidentally introduced a bug that disabled the generation of trees within bubble caves; this is now fixed and trees generate again

I would urgently recommend anyone who misses trees in their dungeon to upgrade to the newest version to get this fixed.

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Update (v1.3.0):

- Added debugging commands: /randungeon:light_dungeon and /randungeon:unlight_dungeon to light or unlight the entire dungeon (both commands are very slow)

- Added debugging commands for debugging use of the entity spawning API: /randungeon:populate_dungeon spawns all entities on all levels in at once, and /randungeon:clear_dungeon wipes them all. Both prevent potential future spawning

- Using /randungeon:populate_dungeon or /randungeon:rewrite_spawn_log also creates a HTML file in the world folder that can be used to visually see where entities are spawned, as well as graphs that help with debugging

- some bugs with the entity spawning API have been fixed, but that's not rlly super relevant given that it's not rlly stable yet anyways

- All of the aforementioned commands require the randungeon_dev privilege

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Update (v1.4.0):

- The water in swampy forest cave biomes is greenish/graying in color now, like brackish water, and there's an option to reverse that change in the settings. This should look better than having shallow water in a brown-ish/green-ish swamp completely in blue.

- Bubble caves (the artificial caves that can be found in randungeon dungeons) sometimes have flattened floors now, allowing for more horizontal movement (giving them a dome shape rather than a spherical shape).

User avatar
Phii
Member
Posts: 17
Joined: Fri Jul 01, 2022 19:49
GitHub: phseiff

Re: [MOD] Randungeon (highly randomized aesthetic-focused dungeon generator) [randungeon]

by Phii » Post

Update (1.5.0):

- : Non-swampy forest caves sometimes have tiny shallow river water ponds in them now, generated using perlin noise. Partially flooded forest caves (the ones with deeper water covering them up to a certain level) are still a thing tho; they didn't get "replaced" with the new thing or anything.

- Non-swampy forest caves sometimes have tiny patches of flowers or puddles in them now; these patches can be an indicator that there's some ore underneath them. This means that flowers will now be obtainable within the dungeon !

- Bubble caves (the typically-round caves that generate specifically in randungeon's dungeons) can have perlin-noise based irregularities in their floor structure, meaning that there can now be irregularily places cliffs or slightly wavy terrain on their floor, making it a bit more natural-looking.

- Natural caves (the ones that occur everywhere in the minetest world, not just in randungeon's dungeons) can now contain patches of randungeon's cave biomes in them (though only if they overlap with the area of one of randugneon's dungeons)

Update (1.6.0):

- swampy forests caves sometimes have secret water-flooded tunnels in them now. these 1x1-block-wide tunnels start hidden at the bottom of deep water puddels and go vertically downwards until they meet another cave or corridor, at which point they end with a metal trapdor at this corridor's ceiling.

Update (1.7.0):

- the trapdoors at the top of the dungeon's upmost level's staircases now open into realistic directions, with their hinges being at the side of the staircase rather than in the middle

Bugfix-Update (1.7.1):

- the staircases that lead from the uppermost dungeon layer to the surface of the world now go up until one block under the trapdoors that cover them; this means that it's now possible to leave the dungeon without having to build up using blocks. For comparison: previously the staircase went up until two/three (depending on how you count) blocks beneath the trapdoors, meaning that there was a two-block fall from the trapdoors to the uppermost step of the stairs, and therefore no way to easily exit the staircases at their top end. So this is fixed now!

Post Reply

Who is online

Users browsing this forum: Zav and 19 guests