Open World Prototype: City Streaming Technique and Source Code
I created an 8×8 city, meaning a total of 64 blocks. I created the buildings in Unity using cubes and textures. The main feature for this requirement was the streaming of the city, which meant that when the player was at a certain block in the city only the blocks that were necessary to be present for gameplay should be spawn, and the rest should be deleted. There are three scripts that take care of this process: TriggerVolume, BlockStreamScript and StreamManager
I began by creating a script that creates a trigger volume for each block. I used all colliders in the block in order to obtain the bounds of the collider. I made sure to include a rate variable so that I could play around with the size of the collider that is created because sometimes it ended up being 2x bigger than the city block.
Setting Each City…
View original post 219 more words