Testing and Tuning

To debug what's going on with your matchmaking pool, you can get snapshots of the queues using ovr_Matchmaking_GetAdminSnapshot, which returns the state of the queue at whatever time this request is made. This endpoint is not intended to be called in production.

// In your code, do a matchmaking enqueue first

// We can now inspect the queue to debug it.
ovr_Matchmaking_GetAdminSnapshot();

// In your handler
case ovrMessage_Matchmaking_GetAdminSnapshot:
  if (!ovr_Message_IsError(message)) {
    auto snapshot = ovr_Message_GetMatchmakingAdminSnapshot(message);
    auto candidates = ovr_MatchmakingAdminSnapshot_GetCandidates(snapshot);
    auto firstCandidate = ovr_MatchmakingAdminSnapshotCandidateArray_GetElement(candidates, 0);
    if (ovr_MatchmakingAdminSnapshotCandidate_GetCanMatch(firstCandidate)) {
      cout << "Yay!" << endl;
    }
  }         

You can also view a snapshot of the queue at enqueue time:

ovrMatchmakingOptionsHandle matchmakingOptions = ovr_MatchmakingOptions_Create();
ovr_MatchmakingOptions_SetIsDebug(matchmakingOptions, true);
// set other matchmaking options here ...
ovr_Matchmaking_Enqueue2("my_pool", matchmakingOptions);
ovr_MatchmakingOptions_Destroy(matchmakingOptions);

// In your handler
case ovrMessage_Matchmaking_Enqueue2:
  if (!ovr_Message_IsError(message)) {
    auto enqueueResults = ovr_Message_GetMatchmakingEnqueueResult(message);
    auto snapshot = ovr_MatchmakingEnqueueResult_GetAdminSnapshot(enqueueResults);
    auto candidates = ovr_MatchmakingAdminSnapshot_GetCandidates(snapshot);
    auto firstCandidate = ovr_MatchmakingAdminSnapshotCandidateArray_GetElement(candidates, 0);
    if (ovr_MatchmakingAdminSnapshotCandidate_GetCanMatch(firstCandidate)) {
      cout << "Yay!" << endl;
    }
  }

Tuning Your Matches

After you've finished implementing Matchmaking and have the desired configurations in place, you may wish to tune the Matchmaking service. We introduced the concept of Advanced Tuning and Match Quality in Configuration Overview where you can choose the 'Minimum Quality Bar'. We recommend leaving this value at the default 0.5 when you were implementing Matchmaking. However, now it may be appropriate to tune this value.

To tune your Matchmaking implementation, we recommend the following adjustments:

  • Small user pool - If your pool of available matchmaking players is small, you may want to reduce the Minimum Quality Bar to allow for more matches.
  • Match process takes too long - If the matchmaking service is taking too long to match users, you may want to reduce the Minimum Quality Bar to allow more, less optimal, matches to be made.
  • Large user pool - If your pool of available matchmaking players is large, you may want to increase the Minimum Quality Bar to search for better quality matches.
  • Match quality is low - If low-quality matches are impacting the user experience, you may want to increase the Minimum Quality Bar to search for better quality matches.

Test Multiplayer Integrations Locally

The Platform SDK allows you to test your Multiplayer integration by initializing multiple copies of the app locally, without making any external connections. Please see the Initializing and Checking Entitlements guide for information about initializing in standalone mode.

Create test users in the Developer Center under the Settings tab, to test matching of users into a match locally.