Finding Rogue Walls
#PanicRoom Day 093
#100DaysOfGameDev R2D58
#100DaysOfCode R2D58
In the course of debugging BuildRooms() to figure out why my dividing walls weren’t being built on the right side of the house like they were on the left side of the house, I discovered an interesting tidbit: extra wall pieces.
These wall pieces didn’t need to be there and now I had to figure out why they were being generated. I knew it had to be a result of an algorithm having to do with my BuildWalls() setup, or at least with the data I was sending into it, so I started setting up some Debug.Logs to track down exactly where this was happening.
It took some time, but I finally narrowed down where the code was going askew and was able to fix it so that the newer dividing walls only appeared on open floor tiles that didn’t have walls on them already. With that out of the way, I could re-focus my attention back to figuring out why my room-splitting divider walls weren’t functioning properly.