Should I have one master scene, a scene per location, or...
Posted: Thu May 30, 2019 1:59 am
I'm making an open world game and it'll use the Dialogue System for each location. I'm already planning a map with 10+ locations and it looks like this:
What I'm currently doing is, every time you click on one of those location buttons, it does SaveSystem.LoadScene(sceneName); and there is one sceneName per location button.
Each of these scenes has a LOT of duplication in it though. They all look like this:
They'll differ by having different interactive objects, different backgrounds (and placements), and different characters (with different dialogue), but otherwise they'll be the same. I'm concerned that something could come up in the future that requires me to change each scene one by one. It's not the end of the world, but if I have to do that 3 times, it's going to be a pain.
I asked around on discord for advice, and some people came up with an idea I think is really cool. I could have a "main" scene that has all the things in common in it (like the Dialogue Manager, the HUDCanvas, etc.) and then I could have a specific scene (like "CoffeeShop") that only has the differences (the background, the characters, and interactive objects).
But, to do this, I'd need the main scene and the specific scene (e.g., "CoffeeShop") to be loaded together additively. Then when you change scenes, only the specific scene would be swapped out. For example, It would be "main" and "CoffeeShop", then when you change to "pigsty" it would be "main" and "pigsty".
It doesn't look like the SaveSystem can do this (but I could be wrong). But, is this main/specific scene idea a good one or is there a better way to approach this?
What I'm currently doing is, every time you click on one of those location buttons, it does SaveSystem.LoadScene(sceneName); and there is one sceneName per location button.
Each of these scenes has a LOT of duplication in it though. They all look like this:
They'll differ by having different interactive objects, different backgrounds (and placements), and different characters (with different dialogue), but otherwise they'll be the same. I'm concerned that something could come up in the future that requires me to change each scene one by one. It's not the end of the world, but if I have to do that 3 times, it's going to be a pain.
I asked around on discord for advice, and some people came up with an idea I think is really cool. I could have a "main" scene that has all the things in common in it (like the Dialogue Manager, the HUDCanvas, etc.) and then I could have a specific scene (like "CoffeeShop") that only has the differences (the background, the characters, and interactive objects).
But, to do this, I'd need the main scene and the specific scene (e.g., "CoffeeShop") to be loaded together additively. Then when you change scenes, only the specific scene would be swapped out. For example, It would be "main" and "CoffeeShop", then when you change to "pigsty" it would be "main" and "pigsty".
It doesn't look like the SaveSystem can do this (but I could be wrong). But, is this main/specific scene idea a good one or is there a better way to approach this?