Lobby
Last updated
Was this helpful?
Last updated
Was this helpful?
SocketWeaver currently has Lobby Clusters in four different regions. (Europe, North America East, and North America West). SocketWeaver routes players to the closest available Lobby Cluster by the geo-location information associated with the IP address of the player devices.
Class
SWLobby
You don't need to create a SWLobby object manually. NetworkClient automatically creates one if you provided a valid API_KEY. All the Lobby APIs can be accessed through NetworkClient.Lobby.
A connected player can be in one of the lobby states: Unregistered, Registered, and In Room.
In different lobby state, players can use different sets of APIs. Please see the picture below.
Rooms has 3 states: Default, Starting, and Room Set.
Answer: Once players created/joined a room, they are In room. They can invite friends, manage teams, and message other players in the room. At this moment, the room only exists in the Lobby. To start the room, the room owner needs to call the method to tell SocketWeaver that the players are ready to play.
SocketWeaver will start searching for a suitable game server for the room and will notify the players in the room by invoking the when the game server is ready. At this moment, the room exists in the lobby and the game server.
At last, the players need to call the method to connect to the game server.