What are some proven and preferable patterns to realise multiple "screens" in the game? Not in the sense of displays (monitors) but "views" within the application.
Say it's a Civ/Heroes-type game. We will typically have these screens during the proper gameplay:
- Main map (strategic)
- Battle map (tactical)
- City management screen
- Research screen
As you can see, some of them are UI-like in nature but some are full-blown interactive scenes.
We need to be able to:
- Quickly switch between them
- Keep a global game state between them (e.g. the (in-)famous GameManager instance must stay intact)
- Bonus points if able to make a fancy transition (e.g. city screen rolling down from above)
- Bonus points if able to keep one screen (e.g. city screen) only partly covering another (e.g. the strategic map) and both are animated
Theoretical solutions I can imagine (I'm still a Unity noob):
- Separate scenes for each screen. But will the engine be able to switch between them fast? (I read that a scene is akin to a "level" in a traditional game, which usually means a loading time?) Also, how will I track the global state (GameManager)? Can I overlay one screen over another?
- Everything in one Unity scene but multiple cameras looking at different objects, with switching between them or nesting. E.g. one camera looking at the map grid, another at a city screen etc. But then I run the risk of objects from one "scene" (only virtually) affecting others (e.g. lights or particles) unless I place them sufficiently far apart.
Is any of my ideas going in the right direction? Is there a better pattern that I'm missing?