question

Jason Andersen avatar image
Jason Andersen asked

Matchmaking multi-user

Hello,

I've been testing the matchmaking API and works great when I try to connect one client from on device. But now I want to allow more than one player joins the match, for example two players from one device (PC), play a match with a third one from another device.

This is what I've been trying:

From the device with two players:

1. Logged in the first player

2. Create a "Matchmaking Ticket" adding the second player's id into "Members to Match With" field.

3. Change to second player and create a "Join Matchmaking Ticket".

4. Change to first player and start getting "Get Matchmaking Ticket".

5. From the other device start looking for a match.

Until here everything works fine, in both steps 2 and 3, I got a "200" response, but the status from "Get Matchmaking Ticket" is always "WaitingForMatch", and client never advance to the match.

So my question, is it possible to connect more than one player from the same device, if so what would be the way to do it.

Thanks.

Matchmaking
1 comment
10 |1200

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

Rhys van der Waerden avatar image Rhys van der Waerden commented ·

Hey @Jason Andersen, did you ever find a solution for this one? The answer doesn't seem to address your issue. I am similarly wondering how to group two local players into a single client's matchmaking ticket.

0 Likes 0 ·
Sarah Zhang avatar image
Sarah Zhang answered

Yes, it’s OK to connect multiple players on the same device. If my understanding is correct, you mean a 2v1 match. So did you add judgment logic in your code to judge who choose a 2 members team and who choose to play alone? If you haven’t added such judgment in your code, in step 5 after the third player(the other device) starts GetMatchmakingTicket, his ticket will be in the WaitingForPlayers status. The third player will wait for the group member too, and won’t arrive at the WaitingForMatch status. Only if the two tickets both in the WaitingForMatch status, they can be matched successfully.

If the above content can't help you, maybe you can provide your queue configure so we can navigate it.

2 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.

Jason Andersen avatar image Jason Andersen commented ·

Hello @Sarah Zhang and thanks for your response, As you said I haven't implemented any logic to link player to team, I'm using UE4 plugin and I haven't found any function related to TEAMS, should I specify this passing as an attribute the moment I'm creating the Matchmaking Ticket? Here is the Queue config I'm using.

Thanks

0 Likes 0 ·
playfab.png (46.7 KiB)
Sarah Zhang avatar image Sarah Zhang Jason Andersen commented ·

@Jason Andersen

Actually, if you set the team size as shown in this screenshot. In your code, you don't have to add the MembersToMatchWith field and don't have to use the JoinMatchmakingTicket.

You can use the code and the process like you matching the single-player. You just need to CreateMatchmakingTicket in your three clients, then GetMatchmakingTicket in your three clients. They will be Matched, then be assigned to the appropriate team.

If you want to make the match based on the device types. You can refer to this queue configure.

If you want to use your original way. Currently, PlayFab hasn't provided the built-in Client API to choose the team name yet. The possible workaround is instancing two CreateMatchMakingTicketRequest. One adds the MembersToMatchWith field and another one doesn't. Then let clients choose to send which one request. In this case, let the first player send the request with the MembersToMatchWith field, let the second player send the request without it. They will be Matched, then be assigned to the appropriate team too.

0 Likes 0 ·
jasonandersen avatar image
jasonandersen answered

@Rhys van der Waerden, unfortunately we were never able to get PlayFab to be a good match for our needs.

,

@Rhys van der Waerden, unfortunately, we ultimately decided that PlayFab was not the right solution for us. We never did get it working to match our requirement.

1 comment
10 |1200

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

Rhys van der Waerden avatar image Rhys van der Waerden commented ·

Thanks for the response.

0 Likes 0 ·
Rhys van der Waerden avatar image
Rhys van der Waerden answered

It seems you can do multiple users per-device by supplying the a custom attribute with a count of players on that device, and then using the "match total" rule to limit how many can join a room. I'm not sure if this can be considered in team balancing though.

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.