|
I am randomly creating a city from a selection of randomly generated building tiles. I want to make it so the player can enter any of these buildings. The way I see it, there are two ways I can do this:
If anyone has any ideas, I'd really appreciate some advice.
(comments are locked)
|
|
You can use proximity and visibility to take a good guess at when to start loading rooms. You can, for example, put a box collider somewhat larger than your building where the building will be. When a player enters that bound, start loading the interior. He may not go in, so that may be a waste. In that case, you could check the visibility of the collider (or building) to see if the user is looking in that direction. You can also check his velocity to see if he is moving toward the building. BTW the proximity bound need not just be a simple box larger than the building. It can be any shape, or group of shapes. For example, you could put small boxes in streets and alleys that trigger the loading. You see many games where there's sorta an 'airlock' where you enter a small hallway and need to go through a door at the end. This is why. Entering the small hallway loads the content behind the next door. You can load scenes additively. A scene may have its own occlusion culling in it, so if you do it that way, at least the interiors can be optimized. I would love to see more LOD (load-on-demand and level-of-detail) support in Unity to support this type of thing. I saw it in Unreal and it's amazing. I've seen it in VRML/X3D too, for a long time. And I know people have coded it themselves in Unity (I heard all of Paris is in Unity this way), but an Asset Store package would be wonderful. Or better (for us) just make it part of Unity 3.5
(comments are locked)
|

Just for clarification, when you say "Each room will also have randomly generated items, so I'm not sure if this technique will work?", what about that technique will fail?
Sorry, I'm not sure why I added that. It should be simple enough to occlude my items too.