Skip to main content
Version: 5.7.0

FindLobbyWithPingData

Adds the caller to the lobby entry queue.

Use PingRegions to generate the ping data.

ServiceOperation
lobbyFIND_LOBBY_WITH_PING_DATA

Method Parameters

ParameterDescription
lobbyTypeThe type of lobby to look for. Lobby types are defined in the portal.
ratingThe skill rating to use for finding the lobby. Provided as a separate parameter because it may not exactly match the user's rating (especially in cases where parties are involved).
maxStepsThe maximum number of steps to wait when looking for an applicable lobby. Each step is ~5 seconds.
algoThe algorithm to use for increasing the search scope.
filterJsonUsed to help filter the list of rooms to consider. Passed to the matchmaking filter, if configured.
isReadyInitial ready-status of this user.
extraJsonInitial extra-data about this user.
teamCodePreferred team for this user, if applicable. Send "" or null for automatic assignment.
otherUserCxIdsArray of other users (i.e. party members) to add to the lobby as well. Will constrain things so that only lobbies with room for all players will be considered.
pingDataPing times for each region available for this lobby type. Can use GET_REGIONS_FOR_LOBBIES to retreive the list of regions for a given lobby type. Ping data is automatically passed in on the clients.

Usage

http://localhost:3000
string lobbyType = "4v4";
int rating = 76;
int maxSteps = 3;
string algo = "{\"strategy\": \"compound\",\"algos\": [{ \"criteria\": \"ping\", \"strategy\": \"absolute\", \"alignment\": \"absolute\" },{ \"criteria\": \"rating\", \"strategy\": \"ranged-absolute\", \"alignment\": \"center\" }],\"compound-ranges\": [[ 30, [ 5, 10 ]],[ 50, [ 10, 15 ]]]}";
string filterJson = "{\"cheater\":false}";
string[] otherUserCxIds = { "123456:aaa-bbb-ccc-ddd:asdfjkl" };
bool isReady = false;
string extraJson = "{}";
string teamCode = "blue";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.LobbyService.FindLobbyWithPingData(lobbyType, rating, maxSteps, algo, filterJson, otherUserCxIds, isReady, extraJson, teamCode, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"entryId": "7483a8-a27"
}
}