question

Andrew Gotow avatar image
Andrew Gotow asked

Matchmaking - Matchmaking Ticket Status

Hello, I have a few related questions!

We're evaluating using the new Matchmaking system with our own externally hosted servers.
When players select a mode in our game, we use `CreateMatchmakingTicket` to add them to the matchmaking queue. Then, we poll `GetMatchmakingTicket` to determine when the player or their group is placed into a match. Finally, we use the "Match ID" returned from that endpoint to spin up a game server for those players.

At the moment, we're placing players in a server when the status of their Matchmaking Ticket is "Matched", assuming that the matchmaking system has found a full server worth of players and is ready to start the game.

  1. When a ticket's status is set to "Matched", does that mean that game with the provided "Match ID" is full, or does it merely mean that the players associated with that ticket have been placed into a game and more players will trickle in later?
  2. If a status of "Matched" does indicate that the game is full, how do we acknowledge that the Matchmaking Ticket has been handled and players are in a server? Is there any way for our game servers to acknowledge that a player has joined and is no longer in the matchmaking queue?
  3. Will tickets stay in the "Matched" state forever? Do we need to call `CancelAllMatchmakingTicketsForPlayer` when the game is over to free up players so they can enter the queue for a new match?
Thanks!
multiplayerMatchmaking
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

>> we use `CreateMatchmakingTicket` to add them to the matchmaking queue. Then, we poll `GetMatchmakingTicket` to determine when the player or their group is placed into a match.

I am not sure where did you implement this feature, but I believe since the matchmaking system is hosted on PlayFab, the Creation and polling status can be implemented on the client side, which will save plenty of your agent server resource.

>> does that mean that game with the provided "Match ID" is full

I am not sure what is the meaning of “full”. Assume 2 players create 2 tickets and according to the queue configuration, they will be matched. After some time, PlayFab will match the tickets, and at that moment, the ticket will be marked as “matched”. Then the matchmaking process is ended, and in the normal circumstances, other players in the matchmaking queue won’t affect the these match.

  • You may notice that there is a min number and max number of players in the configuration of matchmaking queue. Each match cannot guarantee the max number of players but the ticket must be matched with the min number of players.
  • After a ticket is matched, the state won’t change anymore, “GetMatchmakingTicket” will always get the same result of “matched”. If the number of matched players haven’t reached the maximum, the server can create “backfill” tickets to add additional players to the match. Please understand this is a new matchmaking process.
  • “CancelAllMatchmakingTicketsForPlayer” is used when the ticket is in “wait for match” state, as I have said, after a ticket is matched, the process is done and the lifecycle of a ticket is ended.

Hence, my recommendation is

  • Client
  1. Create tickets
  2. Poll tickets to check state
  3. Send the matched ticket to your agent server and connect to the allocated server instance
    • Your agent server
      1. Maintain a mapping database and receive tickets from players
      2. Create data entry according to the match ID, allocate the one server instance per match ID. Return IP, ports to players who request through a matched ticket
      • Server instance
        1. Check the match information from agent Server.
        2. Require connected player’s session ticket/entity token for verification.
      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.

      Steve Lobdell avatar image Steve Lobdell commented ·

      Hi @SethDu, quick question about the "backfill" work flow. So assuming I have a game size of 10, and a match is made for a total of 6 people. I would then connect those 6, and I could create a new matchmaking ticket to look for 4 more people to fill up my match. When a match is made, will the ticket send everyone to a new server? Or will the additional 4 people be sent to my existing server since we have already established a "lobby" of sorts. Thanks

      0 Likes 0 ·
      Steve Lobdell avatar image Steve Lobdell commented ·

      I should mention I'm using PlayFab Multiplayer servers for my game servers which will return a server/port with GetMatch, I'm wondering if it will return one of the two existing server/ports or will send both parties to a new server.

      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.