I'm currently developing a game in Monogame / C#. I have the underlying game engine set up in the following way:
- Entity/Component/System architecture
- A Scene includes a map, cameras, and a list of entities
- Systems act on the top scene in a scene stack each frame
The above approach is serving me well, but I want the engine to be able to cope with local multiplayer games in the future. Currently, the above architecture can cope with multiple players, as long as they are always in the same scene (due to the 1:1 scene/map relationship).
My question is a general one -- what changes would I need to make to facilitate multiple local players who can move between scenes independently? My initial thought is that I'd need to decouple scenes from game screens, but am having trouble visualising the relationship between scenes and cameras/entities/scene transitions/etc. in this scenario.