Cavern corridors took three weeks to implement. That’s over 5% of a year. That’s enough time and effort spent on one feature to raise questions. Was this a necessary feature? Was it worth the effort? How many more features requiring 3+ weeks of development are required to release? Granted, it wasn’t a full three weeks because of my backpacking trip in the middle, and the effort included improvements and bug fixes to shared libraries (cellular automata and random walk), but it’s still cause for questioning.
- Refined cavern corridors. The random walk algorithm used to create cavern corridors is configured to more often move toward the target rather than a random direction. This makes corridors look more like tunnels. Sometimes it works too well, producing unnaturally straight paths. I added a check to force a direction change when there are too many consecutive points in the same direction.
- Alternating caverns and corridors. Realistic cave layouts are typically composed of individual caverns connected by tunnels. To mimic this, room types can now be weighted differently based on the preceding room type. This makes it possible to have caverns and corridors alternate most of the time.
- Bug fixes
- Fixed a long-standing bug that caused map generation to occasionally fail when attempting to place the first room. The cause was simple: for some map themes, there was no room type that could fit into the starting space because the minimum room size was larger than the margin size used to select a random point on the map. Increasing the margins fixed the issue.
Next week, I’ll add loops to caves to reduce backtracking and add a random assortment of gameplay refinements.