Bug fixing is progress?
27/Feb 2016
This last week was fairly uninteresting for Stones dev. Mostly what I did was track down a visual bug related to weave mazes , or mazes which loop around on themselves to reuse the same (x, y) coordinate for multiple tiles. Essentially what happens is that due to transitivity in connections to the wall, when a maze wraps around a single wall tile then there will be multiple tiles connected to the wall from the same direction. The wall can only connect back to one of the incoming edges, and so visual inconsistencies arise when you query the wall for its adjacent tile with the intent to draw what is next to that wall. Sometimes you would get the right tile, and sometimes you can magically see through the floor to a different z-level. This graph structure is desirable from a traversal standpoint, although typically a moot point since you can’t walk through impassable Tiles. The main fix was to simple adjust my field of view calculations such that it will never query a wall tile for its adjacency if the field source is a non-wall Tile. Sounds easy, and once I realized what was going on it was easy, but figuring out what was causing the visual inconsistencies took me an embarrassing amount of time.
I also started converting my maze generators to generate standard room and corridor dungeons, although this is still incomplete. I ended up fixing another bug as part of dungeon generation. Basically what was happening was that occasionally the origin node in my maze would be removed due to being a dead end, but would still be accessible due to it being the origin node. The fix was easy - just let the origin be an arbitrary node in the maze. Same thing though - while the fix was easy, figuring out why I would occasionally traversing the maze graph would result in nil pointer dereference was tricky.