To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Randomly-generated dungeons  (Read 1168 times)

0 Members and 1 Guest are viewing this topic.


« on: 10, October 2021, 06:03:58 »
I have just updated Main to feature randomly-generated dungeons. Please play through the dungeon and try to find anything I can do to improve it.

This feature is still in its early days. There's only 1 dungeon template available (though more can quickly be made). Many other features have yet to be added. Additionally, the difficulty of dungeons might be too high or (less likely) too low, so let me know what I need to do to fix it.

It's on main so it can get some playtesting to ensure everything works under normal conditions. Please let me know of any bugs or improvements that can be made.

To access these dungeons, find a wizard named Bobariz, who has a house to the East of the Tower of Bebeniss. Talk to him, and when you choose the dungeon to visit, stand on the blue platform. 60 seconds after you finish the conversation, all players on the pedestal will be transported to a dungeon. The only way out is to complete the dungeon (each dungeon has a boss monster) or die. There are currently 2 variants of the boss room that were made by me, and infinitely many that could spawn if those 2 "prefab" versions are not selected to generate.

Each dungeon will get more difficult each time you complete it. That's another aspect that needs to be balanced. In the future, more difficult instances will yield better loot. Because I chose to add random dungeons to Main prior to merging Smacky's PA stream to Main, there's no mechanism to reset dungeon difficulty. If a dungeon becomes too difficult for you to complete and you would like to continue playtesting, send me a PM on the website (I may not see it in-game) and I'll reset you as soon as I can.

In the coming days or weeks I will post a tutorial on how to make templates so any mapmaker can contribute.

Happy hunting!
-- _people_ :)


« Reply #1 on: 10, October 2021, 15:01:32 »
I've tried it a bit and will list the following issues:

1. NPC tells me to stand on an orange square is but at least for me it is blue
2. Mob respawn time is far too fast. I end up surrounded by 5 or 6 mobs and by the time I've killed a couple another has respawned on the same spot. It's also a bit depressing fighting your way through dozens of raas, wyverns, golems, dragons etc just to find out that you've reached a dead end and have to kill them all over again
3. Mob density seems a bit high so whenever I take a step anyway I attract aggro. Ranged spellcasters also are annoying as to chase them down you need to run into half a dozen mobs.

I'll try to test the boss mob but so far I get crushed under a zerg rush and I don't really know where I'm going
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.


« Reply #2 on: 10, October 2021, 15:34:22 »
1) Oops! On my test map it was orange, but when I made a new map for the DP I made it blue. I'll update the NPC's text.
2) It's default spawn time (at least for now, buffed maps might have faster spawns in the future). It might seem excessive because of point 3. I'll nerf it a little.
3) I'll work on fixing that today. I think I want to change how mobs spawns are selected anyway. ATM it iterates through each square and does a random roll to check if a mob spawns there. With a sufficiently low spawn rate that's fine, but I think a better method would be to randomly select circular areas. These areas are where mobs spawn. This makes it possible/easier to add linked spawns for higher tiers and also gives better control over how many mobs are spawned in each room/corridor.
-- _people_ :)


« Reply #3 on: 10, October 2021, 16:38:02 »
Having had a look at it does seem that taking a wrong turn can lead to players doing through a lot of rooms just to reach a dead end.

I suspect main issue is getting lost and facing a constant stream of mobs while lost. Eliminating respawn means you can backtrack with ease and eventually find the boss room with trial and error. Otherwise map has to be a lot smaller.

I think I could reach the boss room but I think it would take me around 3 or 4 hours while also making notes on paper about what I've explored, where I've been etc so I completely map the dungeon manually while advancing very slowly. Otherwise it's boldly advancing in a random direction and hoping for the best until I hit a dead end and then start going in circles.

It is possible that I'm just a bad navigator. I'll also add that with current difficulty I'm unsure if anyone other than me can even clear the rooms as being able to tank 4 to 5 lvl 110+ mobs is a prerequisite
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.


« Reply #4 on: 11, October 2021, 14:29:30 »
I enjoyed the new RGD and look forward to testing / playing it more. I love the idea!
Just a quick question and comment.
I did test / play the new RGD twice yesterday. I did not make it to the the final room / boss both times.
My biggest problem was (and Shroud already commented on this) every room looks the same so what happened is I ended up circling around to rooms I had already cleared and because of how long it took me to circle back all the corpses had cleared so I didn't know I had already cleared that room.
Perhaps a flag could be set so that each randomly generated room must have at least one unique characteristic? Or may be not have corpses clear while instanced to that player until the dungeon is exited?
Lastly, is the only exit point at the boss? 
My retirement the Grim Reaper


« Reply #5 on: 11, October 2021, 18:49:44 »
Yes, the only way to exit is to defeat the boss or die.

I have a few solutions for this problem.

The first solution is to add "biomes" to dungeons. We can have a few different tilesets in each dungeon, which will vary the tiles placed. In the future I'd like to make biomes influence the shape of each room (e.g. we can have some twisty passages for a cave, which leads to a man-made structure with perfectly linear corridors and square/rectangular rooms). But for now, it only affects what tiles are placed.

Here's an early WIP:
(click to show/hide)

I might try to find a way to bisect biomes based on progress through the dungeon. This would mean you will know if you already visited a biome with lush plant life and you see that biome again, you've taken a wrong turn. There are some technical constraints to this so it might not work out.

Second solution is, as you pointed out, "landmarks". The generator already has support for prefab (made by me or some other human) rooms, but I've been wanting to add prefab decorations (for example, a pool of water with some decorations around the edges). This shouldn't be particularly difficult, but we'll see how it turns out.

-- _people_ :)


« Reply #6 on: 11, October 2021, 20:25:33 »
Love the spoiler picture   :-*
My retirement the Grim Reaper


« Reply #7 on: 13, October 2021, 01:56:36 »
Having looked at the biomes one interesting point is that one of the white biomes is actually not connected to any of the other white biomes and is actually connected to the black biomes. Thus depending on the layout you could get a false positive with biome repetition system.

Actually as far as navigation goes one idea that could work is to make biomes based on distance from the boss room. So let's say boss room is at the end, then biome1 is 1 to 2 rooms away, biome2 is 3 to 4 rooms away, biome3 is 5 to 6 rooms away etc.

This would mean that if your biomes end up reversing you know you're going the wrong way. Only drawback is that in a linear map if you start in the middle you could get same effect as you're going further and further away.

Another thought is that biomes can actually be coded based on mapset to give an indication of distance from the boss room. For example if map is called Volcanic Cave System then when very far away you get an ice biome. As you get closer you then get a winter biome, normal biome, desert biome and then lava biome. In this case it's a temperature theme. Naturally for an Icy Cavern System you can then reverse the biomes. If you have a Land of the Giants you can start off with dwarves and ogres as the mobs then get to human sized ones and then eventually to giant sized ones.
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.


« Reply #8 on: 13, October 2021, 22:11:57 »
The "white biome" (same as the normal cave, but with desert floors just for testing) being disconnected can make sense from a natural environment perspective. Perhaps the top part of a U-shaped dungeon is under a lake, so it has lots of stalactites and perhaps fungi from all the moisture. But the rest of the dungeon is not under a lake, so it's more dry.

However, in the interest of ensuring players don't get lost, I think basing it on proximity to boss room could work well. The starting and ending points are calculated using two breadth-first searches, so I already have a graph for each dungeon of what the shortest path for the player to travel from start to end is. So for each node, I can assign it a biome based on how far from the start it is.

The only drawback here is that it would become more difficult to accomplish biome transitions inside rooms, and would likely need to be done inside corridors instead.
-- _people_ :)


« Reply #9 on: 15, October 2021, 03:09:18 »
I've just got progressive biomes working. It's not perfect because it uses distance (measured in rooms, not tiles) from the start to determine when biomes should change. This means that dead-end routes will change biomes the same way that the true path to the end does, but with a low enough number of rooms that will result in minimal backtracking.

Also, the intent is that there WILL INTENTIONALLY be dead-end paths which may also have biome transitions, but these should be short enough that it's not a significant hindrance to progress.

I'm also in the middle of rearranging the order of operations for generating a dungeon, because as it works now my goal of room shapes being biome-dependent is impossible. This should be a quick fix, but work has unexpectedly become much more hectic for a few weeks.

Probably the most time-consuming part will be adding floormasks to biome transitions (so the edges aren't so abrupt).

At any rate, I'm targeting next weekend (around the 23rd) for an update which should make Expeditions much easier and more interesting.

EDIT: Also the prefab decorations will probably be the next big update after this one.
-- _people_ :)


« Reply #10 on: 18, December 2021, 23:43:27 »
Sorry about the long delay here!

Because of the way the code was originally written, the flexibility of how rooms are linked wasn't good enough. There was a lot of trial-and-error in the new implementation so I ended up completely rewriting that code 3 or 4 times.

I'm pretty close now, and very happy with the results I have. There are still a few quirks, but I'll post updates as they come.
-- _people_ :)


« Reply #11 on: 19, December 2021, 22:52:25 »
That sounds promising, once the next version is complete let me know and I'll try it out
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.


« Reply #12 on: 30, December 2021, 13:26:11 »
Heya  :)

I did a short pop-up in game this morning (after and very very long break, omg), and tried that RDG.

At first I hoped luck would be enough to find boss, but after a while I got lost and had to fight back same places.

I ended by running only (and healing ...), keeping  walls always at my right, and finally found the boss. I killed it, got a portal.

That end is somehow "deceipting" : the boss has no special name (hopefully it was another mob than all others, making me think it should probably be the boss), it's not more difficult than other mobs ("orange" whereas raas are "red"), and I got nothing at kill : the exit portal suddenly appeared with no explanation.

I would have like for example a blue scrolling message saying "you have completed the dungeon x times"

To help player to navigate, couldn't you make corpses permanent on floor ? You see a corpse, you know you already went there.

Or as landmarks, add special pillars you could apply as lanterns to light corridors/room you have already visited.


« Reply #13 on: 30, December 2021, 15:51:17 »
I just remember I forgot to mention something weird :  one of mob (a red dragon) did completely disappear at my first hit : no kill, no corpse, just pure vanishing.

In fact it happened twice, but I'm nearly sure it was same mob respawn


« Reply #14 on: 30, December 2021, 16:40:40 »
Yep, the difficult layouts are something I've been working on. I already reduced the number of branches each dungeon has, and I'm working on "biomes" so the dungeon's don't look the exact same all the way through. Unfortunately I don't know if I can make corpses more permanent in a specific dungeon. I don't know whether the mechanism for corpses disappearing is due to map swap (which I can change) or whether it's hardcoded in the server on a time delay. I'll look into that.

And yes, I am working on improving the "incentives" for each dungeon. Once I'm satisfied with how they generate, there will be leaderboards and global announcements when a player completes areas. I suppose a VIM (the blue scrolling message) would also be a good idea.

I'll have to look into why the dragons disappeared. That definitely shouldn't be happening :)

EDIT: Something I don't know if I've mentioned already: If you find a bug, please use the "/mapinfo" command which should tell you the seed used to generate the dungeon.
-- _people_ :)


Related Topics

  Subject / Started by Replies Last post
13 Replies
Last post 06, September 2005, 18:20:26
by JasonH
9 Replies
Last post 16, October 2005, 07:09:58
by Carleto
13 Replies
Last post 21, June 2008, 20:38:00
by smacky
0 Replies
Last post 21, February 2009, 05:51:25
by angry
30 Replies
Last post 31, July 2023, 09:53:38
by _people_