question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

Is it possible to retrieve matchmaking player attributes from a game server, without calling GetMatch()?

Suppose I do some CreateMatchmakingTicket() with some player attributes, such as player skill, party size, and other things like that.

I think I can retrieve those player attributes on the game server by calling GetMatch() with ReturnMemberAttributes set to true.

https://docs.microsoft.com/en-us/rest/api/playfab/multiplayer/matchmaking/getmatch?view=playfab-rest

However, my some loading screen logic depends on having those results (player skill, party size, etc) and it'd be nice to be able to retrieve it without having to do an API call.

Can my game server retrieve matchmaking player attributes without calling GetMatch()?

Custom Game ServersMatchmaking
10 |1200

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

Citrus Yan avatar image
Citrus Yan answered

Hi Brent, as far as I am aware, you could also get player attributes by calling GetMatchmakingTicket(). Let me guess, the reasons why you want to retrieve it without having to do an API call is that you don’t want your loading screen logic depends on the result got from calling GetMatch() by the server, which may cause some kind of delay for the players. If this is the case, then I think maybe you can retrieve these data by each client calling GetMatchmakingTicket() and save them for the loading screen logic, in this way you don’t need to wait for the sever. Correct me if I am wrong, thanks.

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Hi Citrus, thanks for the suggestion. You are correct that I am hoping my loading screen logic wouldn't depend on calling GetMatch() since it would cause a delay. I also would need to call 8 API calls (one for each player) to fetch information from PlayFab to send to each client. That may slow things down a bit.

For your suggestion, when each client calls GetMatchmakingTicket() would it be able to get the player attributes from the other players? Specifically the loading screen looks like this:

https://i.imgur.com/9BUDyJr.jpg and I want to show other players' display names, avatars, ratings, etc.

0 Likes 0 ·
brandon@uprootstudios.com avatar image brandon@uprootstudios.com Brent Batas (Lisk) commented ·

What we do (and probably not the best option since it depends on the Client being reliable) is just get the "GetMatch" result from the first connecting client and setup the server with the necessary values we need. It saves time since the server doesn't need to call PlayFab APIs, but it depends on trusting that the Client hasn't somehow modified their GetMatch result

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) brandon@uprootstudios.com commented ·

Thanks for sharing! I appreciate the real-world solution and honesty.

Unfortunately, I'm a bit hesitant to use GetMatch results from the Client, since I was planning to use the GetMatch info to determine player rating changes after the game is lost/won. If someone had a hacked client, they could mess with the values to artificially increase their rating, which would be pretty bad because my game sells itself on its competitiveness.

It's very, very frustrating that there doesn't seem to be a straightforward way to get the players/match information on the server.

0 Likes 0 ·
Show more comments
Brent Batas (Lisk) avatar image
Brent Batas (Lisk) answered

Hi @Citrus Yan, thank you for the reply.


I was thinking I need 8 API calls on the server if there are 8 players, because the server would need to fetch player information for each of the 8 players, unless I trust the client.

Can you give more information on how to make the clients 'more reliable'? I thought anything that a client sends can't be trusted.

It's a bit frustrating that both performance and security was possible with legacy matchmaking in this case, but seems very difficult with servers 2.0.

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.

Citrus Yan avatar image Citrus Yan commented ·

Hi Brent, I think the server will need only one API call since calling GetMatchmakingTicket will return other player’s attributes when a match is completed. About making the clients more reliable, sorry that I am not an expert in it so I cannot provide any professional suggestions, I’m discussing with experts and will come back later.

0 Likes 0 ·

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.