This sounds very much like matchmaking. If so, this is a fairly complex topic, but here are a few things to think about:
- Matchmaking is definitely separate from game state, and you can think of these as two separate problems.
- You can definitely still use the UE4 built-in replication system along side any matchmaking solution you choose to use (matchmaking is just a way to discover servers that are waiting to be connected to)
- While the matchmaking infrastructure isn’t built directly into the engine, UE4 offers support that wraps third party solutions into platform agnostic API’s (look at the Online\OnlineSubsystem stuff).
In your example where you’d like players to wait in a lobby, and then play games, etc:
- Players that want to join lobbies could contact the matchmaking service (either use third party, or roll your own; UE4 does wrap the ability to invoke these calls from platform agnostic API’s though)
- The matchmaking service would return results back to the player in a form of a list of servers
- These servers could be instances of the engine waiting for players to connect (singles instances, each with a single running level)
- The matchmaking service would be responsible for spawning the instances of these servers based on demand.
- When players join this instance of the engine that is running, it would look like they were in a lobby, this is comletely up to you how you do this in the engine though
- These players could then start the game, etc, using that server until they were done with it
This is an extremely simplified view of one way this can be done, and if I’ve completely missed the mark on what you were trying to achieve, I apologize!
But I do hope this gives a few ideas on this very complex topic!