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 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 [+] button at the right up corner of the Lobby Types list.
The Lobby Type Configuration panel will open, enter a unique Lobby Type Id with no spaces or special characters. The id is used when creating this lobby.
Underneath the Lobby Type Id input box, there are four sections to fill out:
Basics
Teams
Rules
Custom Config
(Note: make sure clicking the Apply button when each tab's fields are filled out)
Basics
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 - 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 how to set a lobby filter script.
Server - Use this drop-menu to select the server to associate with. The drop-menu will list all the custom servers which you defined from My Servers page. Once the lobby conditions are met, this server will be spun up.
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 not satisfying this number.
Max Players - Set the maximum number of players for this team. Other players will not 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 change 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 both of these conditions are satisfied, the room experience will be ready to launch)
---
Allow early start without max participants - as stated above, at the early state 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 check ready-up conditions.
Disband on start - this is checked by default. For 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 defined 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": {
"customParm1": "customValue",
"customParm2": 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"
}
}
โ