question

Niklas Gawell avatar image
Niklas Gawell asked

Prevent being matched agains the same opponent twice

We use the matchmaking to find opponent of similar skill level in our 1v1 duelling VR game. Occasionally there are not that many suitable opponents in a certain skill bracket. Matches are quick, usually about 2 minutes .Are there mechanisms in PlayFab we could use to prevent (or at least lower the chance of) being matched against the same opponent twice in a row. Even preferably not be matched with the last few players.

Best I have come up with so far is that I have a list of say 10 items which I give as a parameter on the matchmaking ticket. I allow for ticket match only if at least one item in my set is in my opponents set. (Set intersection rule). At the end of the game, both players agrees that to next matchmaking one player brings 5 random items out of the 10, and the other player brings the other 5. Then they cannot intersect, but has a resonable high change of intersecting with someone who was not in that game. This is not a satistfactory solution. I hope there is a better one?

Matchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

There is no such a built-in mechanism in PlayFab to prevent matching with the same opponent twice. The queue configuration you mentioned is an optional workaround to achieve this feature. If you need such types of Rules to designate the unmatched opponents, you can try to add a feature request for it.

Another possible workaround is to design an automatic retry mechanism for MatchMaking in your game. When two players complete a game, they can record each other’s player Id, store it in Player Read-only Data. When they are matched with the next opponent, let them compare the opponent‘s player Id with the previous one. If this time’s opponent is the same as last time, you can recreate the MatchMaking tickets for them.

As the supplement, CloudScript can access Multiplayer API listed in the PlayFab API reference. You can call them like so: “var result = multiplayer.GetMatch(request);” So you can add the verification logic on CloudScript.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.