Skill Tree Activated

The quest to become an indie game developer

#100DaysOfCode#100DaysOfGameDevC#Illogical BaconPanic RoomScript-writingUnityVisual Studio

Finding Rogue Walls

#PanicRoom Day 093

#100DaysOfGameDev R2D58
#100DaysOfCode R2D58

finding rogue wall pieces

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.

extra dividing wall piece on top of hallway wall

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.

extra dividing wall piece on top of exterior wall

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.

Leave a Reply

Your email address will not be published. Required fields are marked *