question

element808 avatar image
element808 asked

Matchmake invite (1v1 w/ max match size of 2) issues with MembersToMatchWith

So I'm trying to implement a 1v1 invite system into my game so that players can directly invite another player without going to the general matchmaking queue. I noticed that "CreateMatchmakingTicket" contains an array called, "MembersToMatchWith". This looked promising until I started messing with my queue's and the API. With my current queue's Match Size info set to [Min:2][Max:2], I'm unable to set Ticket Size to be 2 also. The error I'm getting is"Invalid number of users in ticket. The number of users must be less than the max match size of the queue." Is there another way to implement invites of other players or can someone assist me in figuring out what I'm doing wrong? Thanks in advance!

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

According to your description, it looks like you want to add a specific opponent to a match. "MembersToMatchWith" field is designed to invite or add “members” to a team not to add an “opponent” to a match. One ticket corresponds to one team, and one match at least contains two teams, so when you set “Match Size” to [Min:2][Max:2], “Ticket Size” at most can be 1. You can check this section Multiple user ticket matchmaking for how to let “members” join the ticket after one player designated the member list in his ticket.

If you want to add a specific opponent to a match you can consider using “String Equality Rule” in the queue. String Equality Rule is used to ensure that a string attribute is the same across all tickets in a match. This rule can be used to implement a password-based matchmaking mechanism directly, like which one in Pokemon Sword/Shield. Besides, currently, PlayFab doesn’t natively support implementing an invite-accept system you need one more custom server or other external services to handle the process.

5 comments
10 |1200

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

element808 avatar image element808 commented ·

Aloha Sarah,

Thanks for the response. We wasted about 9 hours vigorously testing various code to find out that MembersToMatchWith wasn't for opponents, but teams. Once we got your response though and tried implementing the String Equality rule, that worked perfectly by setting the PlayFab ID of the player they're sending the invite to as an attribute. Then when the invitee searches for matches, it links them up.

This does cause additional issues, but it's a start.

Last question: is there a way for a player to filter/query open tickets based on the String Equality rule?

As a side note, it may be worth updating documentation to state that MembersToMatchWith is a group/team-only flag. The current documentation can be quite confusing and contradictory in places.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang element808 commented ·

>> Last question: is there a way for a player to filter/query open tickets based on the String Equality rule?

Thanks for suggestions, PlayFab currently doesn't provide such features of filtering and querying tickets. There is also no such API that can be used to get tickets that other players create. Game developers need to implement such features via external custom servers and external services now.

0 Likes 0 ·
element808 avatar image element808 Sarah Zhang commented ·

I hear you :) just the part about MembersToMatchWith should be further clarified.

Btw, we were able to implement our own method for inviting friends, mostly using cloudscript. I'll write up a technical document at some point after release of our game detailing our method.

0 Likes 0 ·
Show more comments

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.