Nurullah
Nurullah

Reputation: 103

How can handle multiple game lobbies in Unity?

I'm developing a multiplayer game using Unity and Mirror where I need to manage multiple independent game lobbies on a single server. Each lobby should be isolated from the others, meaning players in one lobby should not interact with players in another lobby.

My current idea is to run multiple instances of the game server (as separate .exe processes) on the same server, with each instance handling one lobby. Each instance would listen on a different port and transmit game data over these ports.

Is this a feasible approach for ensuring isolated game sessions? What are the potential performance implications, and are there better alternatives for achieving this kind of isolation?

Additionally, how can I effectively manage and monitor these multiple instances to ensure they run smoothly, especially considering resource usage and potential crashes?

I'm using Unity and Mirror for the networking.

Currently, all lobbies are created within a single scene. When the server triggers a scene change, it affects all players, moving them to the new scene. However, I need only the players within a specific lobby to transition to a new scene, where they would play in an isolated instance.

Upvotes: 0

Views: 55

Answers (0)

Related Questions