Decent bug removal this week.
- Highest-priority bug. For a long time, the game occasionally locked up. I understood what caused this: an actor’s action never finished, preventing the game turn manager from advancing to the next turn. But, I didn’t know what caused the actor’s action to never finish. Even though this was a game-breaking bug, I ignored it and restarted the game because I didn’t want to sift through the log. I finally motivated myself to look into the issue (I can’t release the demo with a bug this major!) and it wasn’t too difficult to figure out. I realized that the issue occurred every time the player clicked on an Animated Bone Pile from a distance. Animated Bone Piles turn into Skeletons when the player approaches them. Clicking on one from a distance queues Move actions to move the player next to the Animated Bone Pile and queues a Melee attack. When the player moved next to the Animated Bone Pile, the Animated Bone Pile was replaced by a Skeleton but the queued Melee attack still referenced the former. I fixed this by checking to see whether the targeted entity still existed when the Melee attack was dequeued.
- Map generation bugs. All other bugs fixed this week involved history and map generation. The bugs caused empty rooms and reduced room type variation. They primarily resulted from incorrect configuration. The Unity ScriptableObjects I created for configuring history and map generation are powerful but also complicated and fragile. I really need to write some documentation on how to use them and add more field validation to catch configuration issues.
The remaining tasks for the demo are:
- Major bugs fixed: 85%->90%
Next week, bug fixing continues. There is one last known bug in the map generation system. It’s the new top-priority bug because it causes maps to periodically fail to generate. It’s been around for a long time; it’s in the map structure generator, a portion of the code that has a relearning curve every time I return to it.

