I remained in the map generation rabbit hole this week, but I can see the sky above and I’m climbing out.
- Map Subgraph Decomposition. Decomposition of the entire map graph into key components (junction nodes, chains of nodes, node groups, etc.) was added a month ago. This capability enables the level to be populated in a more logical and precise manner. A limitation of this capability was that it only did one iteration of decomposition; if one of the components was a node group, the subgraph represented by that group wasn’t decomposed. I didn’t implement subgraph decomposition because I didn’t think I would need it. I believed it would be sufficient to iterate through each node in the group when placing group-level content. For example, to place a Bandit Hideout in a node group, the map generator would determine a room type for each node and room type placement conditions would ensure that each node was set to an appropriate room type. It was a serviceable solution until I needed to control the content placed in subgroups of a node group. To support this functionality, decomposition needed to iterate until there were no more node groups to decompose. This required refactoring. Many of the graph analysis methods had to be modified to act on a node group instead of the entire map. It was another opportunity to move code from an OOP paradigm to a Data-Oriented Programming paradigm. With this functionality added, the map generator now has access to nested map components and more options for placing content.
- Bug fixes
- Standard object placement checks (blocking paths, adjacent to doors, etc.) not being performed by the grid layout object placer.
- Multi-room Map Elements such as the Bandit Hideout can be placed multiple times in the same room group.
Next week, I’ll enable the history generator and dungeon stocker to use nested map components.
Leave a Reply