Relay vs Lobby
Relay and Lobby are two distinct Unity services that you can use together to create a peer-hosted game with an embedded Lobby. However, due to some functionality overlap between the services, it’s important to note the distinctions.
Lobby is a grouping solution to facilitate assembling players and configuration settings before they enter a game session. Relay is a messaging solution, meant to facilitate a multiplayer game session without a dedicated game server or the complications of direct peer-to-peer (P2P) networking. The game host allocates a Relay server as an intermediary through which it routs all traffic in a P2P way, without exposing the clients' actual IP addresses.
Use Lobby and Relay together to create a game with a lobby that facilitates multiplayer game sessions without dedicated game servers.
Relay | Lobby |
---|---|
Relay is a networking solution that connects players in a peer-to-peer fashion using a server-client environment. | Lobby facilitates grouping players and configuration settings before game sessions. |
Relay facilitates a multiplayer game session without a dedicated game server (DGS) or the complications of direct peer-to-peer connections. | Lobby isn’t limited to peer-to-peer sessions or use with Relay. You can also use Lobby with a traditional multiplayer game with a dedicated game server (DGS). |