I continued working on the new dungeon layout algorithm. I grossly underestimated how long it would take to finish. It’s making me miss BSP.
The grid logic eats massive amounts of time. It’s just little things like mapping local coordinates to global, making sure I’m adding and subtracting 1’s as needed when working with rectangles, remembering that the y value decreases when going north and increases when going south in the coordinate system but the order is reversed when displayed on screen. My graph paper tablet is indispensable for this type of work. I have ten full pages of sketches of rooms and corridors that I used to work out algorithms, calculations, and measurements. Debugging is time-intensive too. Tracing through the code line-by-line to check values, in conjunction with running the map generation visualizer one step at a time, has been effective.
The maps are better than last week, but still basic. The generation is much more robust than last week. Except in some rare cases, there’s no more problematic behavior like orphaned connection points and overlapping rooms. I haven’t re-enabled the processors that run after the basic level structure is created, so the map is unpopulated. There aren’t even any doors. Here are some examples of where the level generation stands:
Next week is all about fine-tuning the generator to improve the map layout. I expect this to be time-consuming because it’s a trial-and-error process.
2 thoughts on “Weekly Update – November 11, 2022”
The problem of interesting level generation reminds me of http://ctrl500.com/tech/handcrafted-feel-dungeon-generation-unexplored-explores-cyclic-dungeon-generation/ – which turned into a massive research project. Probably it can be simplified, but it’s a yet another research.
I personally hope to dodge it somehow. Probably code some simplistic “cycle generation” and use prebuilt rooms.
At a very basic level, I’m doing something similar to the technique used by Unexplored, but in reverse. Instead of generating a map from a graph, I generate a map and construct a graph from it. Then I use the graph to make adjustments to the map, such as connecting nodes to form loops.