I worked on the dungeon generation the whole weekend and I am quite happy with the result. I now have a solid base for all sorts of generators for interiors, so this was time well spend.

The current iteration of the dungeon generator features rooms of any size, caves, caverns and corridors. I can control the occurence of those categories per generation using a ratio for each. I also added a “vertical” generation rule to the system, means I can define how the architecture of the dungeon changes the deeper you go. For example, the amount or size of caves and caverns are increasing and the amount of rooms is decreasing the deeper in the dungeon you are.

I added different types of hazards to the system. I took quite some inspiration from Brogue CE and included chasms, lava pits, flooded areas and subsurface streams of different depths. The caverns can also be used to access the level beneath your current vertical position.

Like I mentioned in the last post, the dungeon is generated using a lock & key algorithm and features regular and locked doors with corresponding keys. While working on this part of the PCG, I took the chance and made use of Godot’s custom data fields that can be applied to tile maps.

I introduced several data fields like blocks_sight, blocks_blast, blocks_gaseous and blocks_liquid which are used by the second system I worked on. Dynamic hazards … ie. TRAPS!

Crude and blocky dungeon with an early version of the fog of war and line of sight system.

Using the flood fill mechanism I already have, I created some basic classes for the dynamic distribution of gaseous and liquid substances to represent traps etc. The gas has several stages of intensity and moves in waves distributing itself uniformly to all sides while the blast is using a line of sight approach so that players can hide behind walls to prevent getting roasted by the flames.

At first the custom data fields were boolean values, but I quickly changed all of them to a float value from 0 to 1. I am now able to “simulate” cracks in old wooden doors where a hint of gas can pass through, or the semi-translucent effect of a thin piece of dried skin (wtf?!) blocking the line sight.

At the moment everything is a blocky mess but I am quite sure that I will start to work on tilemaps in the coming weeks. To settle on the color palette is quite hard.

In the beginning I was going to go with a 16-color palette but quickly found out that it would be very hard to represent different biomes and region tile sets with just 16 colors, so I increased the amount of available colors to 32.

Sunset by Durk
Waldgeist by Acid Burritos

I am trying to get a faded and desaturated look … now I have two different color palettes available and I cannot decide which one to use. Currently I am leaning towards Sunset because it has more variety.

Also the size of the tiles is giving me a hard time. I really want to use 16×24 because it easily allows some sort of isometric effect with more flesh to work on, but that increases the chance to look more and more like a Caves of Qud clone.

Coming weekend I want to implement the basic player mechanic and barebone ruleset to walk around properly. This will allow me to test the door mechanic and start to work on the input system.

That’s it for now! May the wyrm have mercy on you.