So the way I have my game structured currently, I use one scene for the menu, and another scene for the game itself. When starting the game from the menu, the menu scene is destroyed and the game scene is created. When changing levels, the current game scene is destroyed and a new one is created. And when returning to the menu, the game scene is destroyed and the menu scene is recreated.
I’m starting to think this is not the best way to go about this as it requires loading all the resources over and over again. And I’m not using babylon files so I can’t cache them in the IndexedDB.
How does everyone else structure their project? I’m thinking that maybe I should just have one scene for the menu and another for the game that I reuse instead of recreating them over and over again? Alternatively I could create a single scene that is used for everything, and throw everything not being used into AssetContainers.
Thanks John, I do understand how to use multiple scenes, but I’m more interested to hear about what sort of patterns people like to use in their own projects.
Hello, I think your idea is great, I am also thinking about this question now, I am curious about whether your multiple scenes are written in multiple files? I hope you can answer me. Thank you
It is usually good software writing practices to have separate components (scenes in this case) be in separate files as that makes it easier to understand and mantain