Skill Tree Activated

The quest to become an indie game developer

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

Dividing Room Blocks

#PanicRoom Day 106

#100DaysOfGameDev R2D71
#100DaysOfCode R2D71

changelog 9/28/20

Because my days of coding have pretty monotonous, I wanted to shift to a less frequent posting schedule. The daily updates were nice when there was a lot of different things going on and there was plenty to show for it, but now I am just sitting and working on scripts and, honestly, it’s not that exciting. Well, to me it’s still pretty exciting, but I can imagine it’s not much of a spectator sport at this point so I feel like broad-stroke updating might be the way to go.

I have been steadily progressing on the HouseBuilder script and this has lead me to finally starting to work on the individual room blocks and procedurally breaking them up into individual rooms. This is all done by means of what I call my Room Analyzer algorithms. The Room Analyzer for a given Room Block determine the ratio of length to width and, if certain parameters are met, splits the room into smaller parts and re-analyzes those rooms. It’s a fairly tedious process, but I am pleased with what it can do so far and where it’s headed.

#PanicRoom Day 107

#100DaysOfGameDev R2D72
#100DaysOfCode R2D72

changelog 9/29/20

Block A is finished, as far as dividing it into individual rooms goes, and I have shifted my attention to Block B. Today was spent working out how to divide it when the Secondary Hall is vertical and setting things up to work on horizontal Secondary Hallways tomorrow.

dividing Block B horizontally

#PanicRoom Day 108

#100DaysOfGameDev R2D73
#100DaysOfCode R2D73

changelog 9/30/20

Room Block B posed a new challenge because its proportions are significantly different than Room Block A’s were. Block A is composed of an entire section of the house to one whole side of the Primary Hallway, and is generally long on one side and easy to break up into smaller rooms that look realistic. Block B, however, is usually more square and, therefore, a little more tricky to split up in a way that seems natural. For this Room Block, I had to tweak my room-dividing parameters to work just slightly different. Actually, for Room Blocks B and C there will be two sets of parameters: the Standard parameter for when the block meets more traditional ratios of length to width, and the Small Room parameters for when a Block, or room, is still big enough to break into smaller rooms but may not meet the criteria of the Standard parameter. These Room Blocks (B and C) will be prone to have both horizontal AND vertical divisions if conditions are right, and this all has to be calculated on the fly. It can be a little tricky, to say the least.

determining small Ba rooms

Leave a Reply

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