in an open world scenario what is "better" to do everything in a single scene or split

I’m developing an open world game (in order to learn), I’m now developing the world’s base scenario and I have a doubt that I haven’t found answers that would make me understand what’s best. I have the following situation, I am dividing the Unity terrain into some parts, but I don’t know what is better to do, separate them into different scenes (scene 1, scene 2…) and load each part asynchronously, or simply use a system of enabling and disabling parts of the scenery in a single scene.

Initially I thought of keeping the whole project in a single scene, but I don’t know if it will consume a lot of pc memory

If your open world is in a single scene, then all assets will be loaded into memory when the scene is loaded. If you have a large variety of models and textures then this might become a problem.

If your terrain prefabs re-use a lot of the of the same textures you might get away with it. For example you could see a Minecraft like generation managing to fit in a single scene, as the texture memory is small.

1 Like

You will probably want to have one main scene and then use additive scene loading to manage additional resources. You can even create low detail impostors of additional scenes, and then additively load/unload those so far away regions don’t need much memory at runtime.

2 Likes

It’s hard to give a definitive answer without knowing the complexity of the game world you are trying to build. It could be that using a single scene would be fine, it could be that it’s not. Using a single scene makes some things much easier, such as lighting and pathfinding, so if you are seeking to learn about those systems as well you may be better off just using a single scene.

However, in most game worlds of sufficient complexity it will be more performant to split things up. As this is a learning project I doubt you are interested in third party assets, however if you start with a single scene, then down the road decide you need to split things up, and are struggling with how to do so, you can take a look at my Asset Store product (in my signature), The Streamable Assets Manager.

1 Like

Large open-world scenes/maps/etc. takes alot of knowledge. as they are harder to optimize for performance. Now i dont really know needed info about your project. But i can give this advice: no matter how you do it, you NEED to chunk stream your terrain. With Unity, optimization is a total different skill all together.

You can be a great coder, modeler, level designer… none of it matters if you cant optimize…

Best of luck :slight_smile:

2 Likes

CodeMonkey recently scratched the surface… obviously this experiment is far from complete and it’s just a quick prototype with 1-2 features, but if you have money, you can buy in proper tools which make your life easier. If not, you can write your own systems to do essentially the same. Again, all it demonstrates that it is not impossible. The more features you add, the more problems will be waiting for you to solve.

3 Likes

Though this is true, and i feel your pain, optimization is the key. You cant add a feature without a performance impact.

1 Like

If you are going with a single scene you will have to despawn/destroy the non-static objects that are out of reach one way or another.

2 Likes

Usually when someone asks about scene streaming, I like to post a link to this asset:

It’s simple and free. I recommend it more as an example to learn from rather than a complete solution.

3 Likes

I even saw this one, but I wanted it for an open world, and this one doesn’t apply very well

Why not?

1 Like

What Murgilod stated is true and relevant. You stated: “I’m developing an open world game (in order to learn)” (with no info like Unity version used, 2d/3d game, what SRP used, etc.). At this point theres 2 ways to address this. Chunk streaming a single scene (then port to the next scene), or… Streaming multiple scenes, in a single scene manner.

Hence my 1st reply, “no matter how you do it, you NEED to chunk stream your terrain”. Correct?. Heres why, Unity shot itself in the foot with 2 things: Occlusion Culling and Static Batching. They are working on it, but as of current state, not so much. So, for a large open-world game, at the very least, you should plan on a good terrain chunk streaming solution.

Best of luck :), there are many systems and assets that can help you. Just relax, and modify your work flow/plan. You got this, now get back to work! :wink:

1 Like

because it works with triggers, (at least according to what I understood from the example and the documentation it had) I’m looking for something based on the player’s position not depending on triggers

I’m using HDRP in a 3D world. I started to develop something based on the ideas you gave me here in this question, I chose to develop something with dynamic scenes separating part of the terrain into blocks and adding it to a scene. Finish creating a system that generates a grid of blocks that are activated according to the player’s position, but now I’m trying to convert this block “activation” system to actually load the scenes, which is giving a headache

You didn’t seem to pay that much attention to either the functionality or the documentation because there are manual loading and unloading methods you could use to bypass triggers entirely. It’s literally on the second page of the PDF.

1 Like

I thought it could be a translation into my language, but the explanations are minimal, you said you had explanations on the second page, but it has 3 lines.
For this reason, I was confused and did not understand at all how it would be possible to use something like Scene Streamer.

You’re right that the documentation is sparse… still, it does tell you what methods to look at if you want to use custom logic rather than triggers. And if you want it to be based on position but not use the built-in system that’s based on position (i.e. triggers) then custom logic is likely what you need.

2 Likes

hey guys what about Subscene can we use a single scene with some Subscenes?

Possibly, but it looks like that’s an ECS feature. I don’t know how deep you’d need to go down that whole ECS rabbit-hole to get that to work. ECS is a relatively new and advanced feature so I haven’t seen many tutorials about how to use this system.

What do you think subscenes will do that can’t be done with just regular scenes?

from CodeMoneky videos
https://www.youtube.com/watch?v=91kJtsDLTyE

It seems very easy, especially from the other methods I have seen so far, but I could not implement it in Unity 2022 because it requires a Hybrid Renderer and it is still an experimental package, and it does not match with the only version of Entities 1.0 in 2022 LTS, and it gives an error. You must use Unity 2020 version for Subscene to work. if I am wrong please correct me.

also a couple of years ago someone find out how a game like “the forest” is loading their scene which was like super simple they had a single scene for terrain and spawning the objects then for caves they used streaming scenes. (forestMain_v08 is the game) 9225162--1288215--Sample.png