Romain Maurel avatar image
Romain Maurel asked

Matchmaking - Inform Server of the game mode

Hello PlayFab team!

I am about to release the early Beta of my game and would like to improve the matchmaking system. I found numerous content on this forum but most of them are years old (2018) and since the Matchmaking v2 has been released, I would like to be sure of the most up to date best practices.

I have 2 main concerns to be sure to apply the best practices. I am using the Matchmaking + Multiplayer Game Servers:

  • Currently, when matchmaking starts a server I found no way to inform this Server of the Game Mode (1v1, 2v2 or 3v3). So I just deduct it from the number of players on the Authorized players list. (If 6 => it's 3v3). However, I would like to implement Ranked / Unranked / Training game modes. I would only require a single variable to be passed to the server for this, even an integer would be sufficient, or the name of the Matchmaking queue that started the server. What would be the best way to implement this please?
  • I am using a "Lobby server" when players are not in a game that is managing their actions (such as saving their army and checking cheat attempts). I would like this "Lobby Server" to create the matchmaking tickets on behalf of the Clients, including two variables: Their Army power and their ELO ranking. What would be the best practice to perform this on a cheat-proof process Server Side and to prevent hacked Clients from being able to queue themselves using the API?

Thanks a lot in advance for your answers !


game managerMatchmaking
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

Seth Du avatar image
Seth Du answered
  1. It is feasible to deploy single server build. Client will need to update player Entity Object as the Attribute Path when creating the matchmaking tickets. While server will need to iteratively call GetObjects for each player to determine the game mode. As it is not supported to directly pass queue name to GSDK, please feel free to vote in this thread --Pass QueueName from Matchmaking into GSDK - Playfab Community
  2. In terms of lobby, PlayFab provides an official sample on Building Lobbies with Azure PlayFab.(I am unclear if it is suitable for your scenario) However, the scenario you have mentioned above will consume plenty of server computing time as the time that matchmaking process takes is always uncertain. I suggest only when the tickets are matched, will the server instance turn into active. We may dig into it if you can share more details about your scenario.
10 |1200

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

Romain Maurel avatar image Romain Maurel commented ·

Hello and thanks for your answers !

  1. Until this feature is out (I already liked it before) I will manage with a kind of poll from Clients. When they request connection authentication, they each will send a Game Mode requirement to the server and the majority of votes will determine the correct game mode. That is more or less your solution, without the need of changing Entity Object and having a lot of iterative API call.
  2. Very sorry but I do not think this is the answer I was expecting. The Lobby server I is already up and running using Unity and Mirror. My question is about the best practice and APIs to use to create Matchmaking tickets Server side, on behalf of Clients, and preventing "hacked" Clients to queue into the Matchmaking using fake parameters.

Thanks in advance!

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Romain Maurel commented ·

for #2, as you have mentioned, the matchmaking ticket is created on the server side, I don't think there is any hack behavior because the attribute is filled in by the server. In this scenario, you can also modify the API access policy to prevent clients from using CreateMatchmakingTicket API call.

0 Likes 0 ·
Romain Maurel avatar image Romain Maurel Seth Du ♦ commented ·

Perfect, thanks a lot. It answers the question :)

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.