A lobby is a gathering place for a group of matched users before they are served by a room.
Lobby experience is an efficient way to use room or relay server resources. For more information about the brianCloud lobby feature refer to the link here.
Creating a new lobby
Advance to the Design | Multiplayer | Lobbies page, check the [Lobby Service Enabled] checkbox, then click the [+ New Lobby Type] button at the right-up corner of the Lobby Types list.
The Lobby Type Basics Configuration panel will open, enter a unique Lobby Type ID with no spaces or special characters. The id is used when creating this lobby.
Description - This is a good field to use to enter a useful description for this lobby. It is recommended to use a short description to accommodate text display concerns in your app.
Filter Script - Optionally, you can attach a cloud code script for filtering the players who can join this lobby. You can set the player's skill rating or attribute as filter conditions in your script, if the script returns false, the player will not able to join. Check this link for an article that shows you how to set a lobby filter script.
Server - Use this dropdown menu to select the server to associate with. The dropdown menu will list all the custom servers that you defined from the My Servers page. Once the lobby conditions are met, this selected server will be spun up.
Click on the [Continue] button once you have completed your initial configurations. This will prompt the display of three additional tabs on the current pop-up window.
Teams
Team Code - Use this field to define an identifier for a team, the team code will be referenced when players join this lobby, you can define multiple teams for one lobby.
Min Players - Set the minimum number of players for this team. Room experiences will not start if the number of players does not satisfy this number.
Max Players - Set the maximum number of players for this team. Other players will not be able to join this team once reaching this number.
Auto assign players - Allow lobby members to be auto-assigned into this team if turn it on.
Rules
---Section: Lobby times in seconds---
Earliest Start - This is the duration that the lobby state changes from setup (when the lobby is created) to early. That means during this period, the room experience will not start even lobby is full.
On-time Start - This is the duration that the lobby state change from early to pending. That means during this period if the early start is enabled (i.e. [Allow early start without max participants] checkbox is checked) and the minimum team number of players is met, the room experience will launch immediately. If the early start is not enabled, will launch the room experience when satisfying the ready-up minimums condition.
Too Late Start - This is the duration that the lobby state change from pending to fail. That means during this period if the force on-time start is enabled (i.e. [Force on-time start without ready] checkbox is checked) and the minimum team number of players is met, the room experience will launch immediately. If the force on-time start is not enabled, will launch the room experience when satisfying the ready-up minimums condition. (Note: at the final end-point of this time period, the lobby will disband with a message showing "satisfying launch conditions took too long").
---Section: Ready Up Minimums---
Minimum Number - This is one of the room experience launch conditions for the actual minimum number of required players.
Minimum Percent - This is another one of the room experience launch conditions for the minimum percentage of required players.
(Note: only if both of the above conditions are satisfied, the room experience will be ready to launch)
---Section: Others
Allow early start without max participants - as stated above, at the early stage time, if this checkbox is checked and the minimum team number of players is met, the room experience will launch immediately without check ready-up conditions.
Force on-time start without ready - as stated above, at the on-time state time, if this checkbox is checked and the minimum team number of players is met, the room experience will launch immediately without checking ready-up conditions.
Disband on start - this is checked by default. For a long-lived lobby, should disable it, the lobby instance will no longer disband immediately after the hosted server instance is launched. The idea is that you can set up a lobby with a bunch of players and it will stick around even after your game instance has launched. You can all come back to the same lobby after your game instance terminates.
Allow join in progress - it's for backfilling of matches, if this checkbox is checked, it allows players to join the lobby even after the server instance that has been launched (
Disband on start
should be disabled).
Custom Config
This part is pretty straightforward, if you define some JSON config data here, it will be passed to your room server and will be able to read it through the parameter
"roomConfig"
of this lobby.
The configured meta-data of the lobby type will be like this:
{
lobbyTypeDef: {
"roomConfig": {
"customParam1": "value",
"customParam2": 55
},
"lobbyTypeId": "mylobby",
"teams": {
"all": {
"minUsers": 1,
"maxUsers": 8,
"autoAssign": true,
"code": "all"
},
"blue": {
"minUsers": 1,
"maxUsers": 1,
"autoAssign": true,
"code": "blue"
}
},
"rules": {
"allowEarlyStartWithoutMax": false,
"forceOnTimeStartWithoutReady": true,
"earliestStartSecs": 30,
"onTimeStartSecs": 120,
"tooLateSecs": 300,
"everyReadyMinNum": 1
"everyReadyMinPercent": 50
},
"desc": "use this lobby to launch my room server"
}
}