Hello everyone.
In the previous devblog, I talked about how the structure of a new sector is built in IRSEN: first, the generator creates a logical graph made of START, MAIN, BRANCH, and FINISH nodes, then places those nodes on a grid, and only after that turns them into actual rooms. But at this point, only the shape of the dungeon has been prepared.You can perfectly build the main route, attach side branches to it, and connect everything with corridors. Technically, that already gives you a correct map. But if all the rooms inside are identical and their contents are simply scattered around the level at random, then the graph structure gives the player almost nothing except a clear direction from the beginning to the end.Filling the MapThis is the next stage after the map itself has been generated. And again, I did not want to simply scatter enemies, chests, and objects across free tiles at random. At this stage, the generator already knows the purpose of every room, so I was able to use that information when placing content as well.The rooms are no longer identical. By the time the map is being filled, the generator still knows whether a specific room belongs to the MAIN route or is located inside a BRANCH. This makes it possible to treat them differently. MAIN rooms are part of the player’s mandatory route. The player must be able to travel through them from the START node to the FINISH node, so I can separate the way these rooms are populated from the side branches in advance. BRANCH rooms, on the other hand, exist specifically because the player does not have to enter them.If a branch is optional, why should the player go there at all? If a side room contains exactly the same things as the main route, then the branch becomes nothing more than an additional cost in steps. And in IRSEN, that is especially bad because every extra step increases Corruption. So every branch needs to give the player at least a potential reason to take the risk and leave the main path. Because of this, the graph is used not only to build the route itself, but also as one of the sources of information for filling it with content.Main Route and Additional RiskMAIN and BRANCH nodes started to differ not only by their position on the map, but also by their role. The main route is the guaranteed way to complete the sector. Additional branches are a choice.The player can continue toward FINISH, preserving health and time and gaining fewer Mutations, or spend more steps and check what is hidden in the fog. This already creates a small risk-and-reward decision before combat even begins. If the player discovers a branch consisting of several rooms, they know that exploring it will require more steps, and then they will still have to return to the main route. Those steps are not free.But the branch may contain an additional chest, an object, or a group of enemies that can provide more genes for the rest of the run. The decision of whether to go there or not appears not because I created a separate choice window, but simply because of the structure of the map itself. In this way, procedural generation can participate directly in the game design instead of merely changing the shape of the dungeon.Placing ObjectsAfter the rooms are created, the generator starts placing content inside them. This includes enemies, chests, interactive objects, and other elements of the sector.Each type of object has its own restrictions. Not everything can simply be placed in any room. Some elements make more sense as additional rewards. Others can be placed along the main route. Some rooms are better left relatively empty so that the level does not turn into an endless chain of battles.Here, the graph once again makes the task easier. Instead of looking only at the coordinates of a room, I already know its purpose and its position within the structure. Potentially, this also gives me room for future expansion. I could create visually different room types depending on their role, or, for example, introduce events that trigger when the player enters a room.Sectors Change the RulesSector types work on top of this system. Before moving into a new sector, the player chooses its type at the Processing Station, and that choice changes the parameters of the next map. I introduced a set of different sector types. One sector can contain more enemies, another can have more chests or objects. In some sectors, radiation can be stronger, while in others it can be weaker.At the same time, I do not need to create a completely separate generation system for every sector type. For the player, all of this still looks like a new random map. But internally, it is no longer just a collection of random rooms and random objects. First, the generator decides where the player can go. Then it decides what that route will look like. And after that, it fills the route with content.I think this improvement to dungeon generation will make IRSEN more interesting to explore.