Skill Tree Activated

The quest to become an indie game developer

#100DaysOfCode#100DaysOfGameDevC#CodingGame DevIllogical BaconPanic RoomScript-writingUnityVisual Studio

Working Hallways!

D42 #PanicRoom
R2D12 #100DaysOfCode
R2D07 #100DaysOfGameDev

In order to continue working on proper Hallway generation I had to go back an make some changes, but ones I think are for the better. I was having an issue deleting Wall Tiles that didn’t need to be in the game and I discovered that if a Horizontal Wall and a Vertical Wall were assigned to the same Grid Square, only the last one assigned could occupy it. This made it impossible to delete the previously-assigned Tile.

The fix? I had to go back and break up my placedWallTile array into separate placedVerticalWall and placedHorizontalWall arrays. Now I can save the locations of the two types of walls independently of each other and can have them occupy the same Grid Square, like on a corner or where a Hallway meets an exterior wall.

With that done, I ventured on and completed the coding for Secondary Hallways when they appear in the Right, Bottom, and Top Quadrants. A few minor tweaks and HouseBuilder hallway generation was ready for testing. Both hallways now generate properly and the longer side of the Primary Hallway and the Secondary Hallway have open exits to the exterior and the junction where the Hallways meet is now clear. This works for any random house size in any orientation.

Leave a Reply

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