在此專頁上
You should always test your matchmaking implementation and to help make sure the right players are being matched. This topic will provide some techniques for testing and tuning your matchmaking settings.
You can get snapshots of matchmaking pools using ovr_Matchmaking_GetAdminSnapshot, which returns the state of the pool at whatever time this request is made. This method should not 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 pool 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;
}
}
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:
The Room and Matchmaking Debugger is available to help developers identifying what connections and interactions a user or room makes with a room or matchmaking pool. Enter the id of a user or room to get a list of the recent connections.
The table will display a chronological list of events for that user or room. Each row represents a single event with additional information about the occurrence. The results show what event occurred, when it occurred, what user initiated the event, and the room in which the event happened (if in a room). You can select any room or user id returned in the table to retrieve the connection or interaction information about that user or room.
To retrieve the user and room Ids:
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 Native Development Getting Started or Unity Development Getting Started 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.
Matchmaking pool analytics allow you to review stats and the overall health of your matchmaking pools. If you’ve implemented any public facing pools you’ll be able to review the stats by logging in to https://dashboard.oculus.com, selecting the app you’d like to review, then select Analytics and Matchmaking Pools.
Note: To see the Matchmaking Pools analytics, you’ll need to have permission as either a Developer or Admin for the app. Information about different user roles can be found on the Manage your Organization and Users page.
On that page you’ll see the overall statistics of all your matchmaking pools. The filter allows you to review stats for a particular time period scaled by day or hour.
The analytics available are: