Random Seed and Split Screen (Security Management Simulator - Post 4)
Added mechanical floors to my building generator function. Just had to add a check to see if the floor is at the top of a tier (or one below it), and if it is assign the tile type to mechanical. My building constructor will now check for those tile types and give it a unique block.
Also made it so the top tier can contain 2 or three squares as well, instead of just one. It will only do that if the number of square sectors the building is divided into can support it.
Forced a minimum distance between the bottom tiers so they don’t smoosh too close together. I want at least 3 regular floor between each layer of mechanical floors. Added a while loop that checks the distance between the bottom two floors, and if they’re too close, it decrements the tier floor exponent until they’re not anymore.
Made an RNG controller that will give me consistent values, given the same seed. Had to go through and change all my random calls to reference the new controller.
Added a split screen so I can see both the 3d building and the floor slice. Added viewport containers for each view. It didn’t work at first, because it would only show one on screen at a time. If the 3D view was on the screen, nothing would show up in the 2D view and vice versa. I had to change the location in the tree that the 3D cubes were instantiated, and I had to remove a line that cleared the tile map when generating the 3d blocks. Then it worked fine. I still have to do something to make the camera frame things properly. Also the tile map appears to show up in an arbitrary point in the view. Not sure why. Manually put in values that will place it near the top left, but I need a better solution.
Made labels that contain info about each screen. My progress is below:
Migrated my old building constructors into my current building generator script. These are simple rectangular buildings that chop off the corners or take square chunks out. These rectangular building still need mechanical floors.
Also added the address to the label. Added more building names options, including 3-letter companies like IBM or ABC.