itch.io is community of indie game creators and players

Devlogs

Progress Report: Dungeon Rework

Ero Dungeons
A browser game made in HTML5

For a game called Ero Dungeons, the dungeons were rather paltry up to now. They were long corridors with fights. However, that changes now. Dungeons are now actual dungeons. In this devlog I'll explain how the dungeon algorithm creates something like this:

Analytics

But first, something completely different.

It is well known that not all goals are created equally. Neither are all moves equally good. As a dev it's very difficult to balance these things without objective usage data. That's where analytics come in. If you accept it, the goals you complete, the classes you pick and the moves you make will be sent out and aggregated. This allows me to see which goals are never completed, or which moves are never used, and give me more tools for knowing what and how to balance.

Of course, I need your permission for those things. So click on the Accept button of this large pop-up (or don't if you don't want to).

Dungeon Rework

Layout Creation

Even before the first public release of Ero Dungeons I had plans for non-linear randomly generated dungeons. However, as you know, it didn't work out. I originally started with the starting room, and then added a new room from a set of possible rooms. Repeat until you get a full dungeon. Unfortunately, this was very convoluted. It was very hard to get a neat condensed layout without long winding paths, it was also difficult to put special rooms in good locations. All in all, it didn't work, and I switched to the current layout.

To fix it I decided to start from a grid, and built the thing with moddability in mind. Any capital letter is a moddable parameter. You start with an X by Y grid and fill it with rooms. Then you do Z steps, where in each step you either (with a W% chance) remove an entire room, or (with a V% chance) remove a connection between two rooms. After each step we check whether the start and end room are still connected, and if not, undo the step.

After all this, we remove all disconnected rooms. Checking connection is very simple since Godot has a built-in Astar2D node which does all that work for us.

Room Creation

I originally thought to create rooms using perlin noise. It would give a very random result, but still tie everything nicely together. It didn't work at all. The results were hard to work with, especially ensuring that the rooms would connect correctly on the corridors. So I switched to a different method.

A room consists of a center part and side corridors. The center part could be a square, or a rectangle (all moddable) where the main attraction of the room is. This contains a combat encounter, or (soon) a curio, or a combination (or nothing). This is drawn out first.

Then, depending on the surrounding rooms, corridors are drawn from the sides to the center (the width is also moddable). And that's how you get the rooms. It's a pretty simple process, but it works.

Variety

The algorithm above allows variety between different dungeon types.

A machine dungeon has few removed rooms, and is very packed. Here's an adept lab dungeon:

A spider dungeon covers a large area, but has many removed rooms and connections, as well as many empty rooms. Making it feel cavernous. Here's a veteran caverns dungeon:

A ratkin dungeon lies between the two, and is average on both. Here's an elite ratkin dungeon:

As you see, the dungeons become larger and more complex as the difficulty increases.

Changelog

Content:

  • Analytics for balancing. See above.
  • Full dungeon rework. See above.
  • UI changes to accommodate for the dungeon rework. See below:
  • Hypnosis has been completely reworked. Suggestibility now decreases after each day. Hypnotic suggestions are given at the end of a dungeon and are a lot more fun.
  • A bunch of new equipment from modders Orchid and HereticAngel.

Minor:

  • Corrupted girls are now corrupted over time (and you can see the corruption when you inspect their info panel) instead of all at once.
  • You can now see the chance that you rolled a girl that good or worse on the stagecoach.
  • Swift is now a hidden script and shown explicitly in the tooltips.
  • All self targeting moves now explicitly show they target self in their move description.

Bugs:

  • Items on hidden parts of the sprites weren't correctly hidden.
  • The maid bikini didn't remove a worn outfit when equipped.
  • Visual bug when recruiting girls while at max capacity.
  • Satisfaction of afflictions wasn't saved.
  • Brows would show over hoods after expression changes in combat.
  • You no longer get half essence from some parasite extractions. 
  • Cocooned girls would stop moving after attacking.
  • Denial tokens would disappear after 10 turns.
  • Forced tokens stuck after the forcing gear got destroyed.
  • Removing an accessory which fitted multiple places, would only remove the first overlapping item.
Download Ero Dungeons
Read comments (6)