question

tweekley5 avatar image
tweekley5 asked

Matching Backfill Tickets

Are backfill tickets that are created with the server automatically thrown into the same queue that the client's use? Meaning a regular CreateMatchmakingRequest and using that request for a CreateMatchmakingTicket will have the ability to make with a backfill ticket?

apissdksCustom Game ServersMatchmaking
3 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.

tweekley5 avatar image tweekley5 commented ·

My backfill ticket is being created properly, but my player cannot connect. Here is the scenario I am trying... Player A and Player B matchmake successfully and a server is allocated for them. My server is not at max capacity, so I create a ServerBackfillTicket. I see in the logs that the backfill ticket is successfully created. I leave the session with player A to verify if the backfill ticket system is working correctly. I try to find a match again and Player A never rejoins the game session. I even removed Player A from the List Members that is in the ServerBackfillTicket request.

0 Likes 0 ·
tweekley5 avatar image tweekley5 tweekley5 commented ·

The backfill works fine if Player C matchmakes, but I need to be able to account for players leaving. It seems like the GetMatch with ReturnMemberAttributes set to true doesn't return the latest list of Members of type MatchmakingPlayerWithTeamAssignment[]. How can I go about making sure this list I am passing into the Backfill ticket is the most up to date information so that matchmaking can maintain teams and such appropriately?

0 Likes 0 ·
tweekley5 avatar image tweekley5 tweekley5 commented ·

Furthermore, to just try and get a clear answer, if I can’t get an updated ReturnMemberAttributes list of members, if a player leaves a team, wouldn’t that player still show in the list as being on the team? If so, how would that team ever get refilled? Just having a hard time understanding the out of date ReturnMemberAttributes list. I have a list of ConnectedPlayers, but that doesn’t store any meaningful information since it’s just a player tag for the field.

0 Likes 0 ·

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

GetMatch only returns the static list of initial members, and it is by designed. If GetMatch’s result reflects the currently connected players, then when the match is complete, clients don't know which players they will be playing with because no one is connected at this time. So it's a static result of a specific match, not the state of the server. To know which players are currently connected, you should maintain a list of connected players on the server. You can refer to Giving PlayFab information about your game server.

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

tweekley5 avatar image tweekley5 commented ·

How would a list of connected players help me generate the MatchmakingPlayerWithTeamAssignment type that is necessary for a Server Backfill Request? A list of connected players stores a type of ConnectedPlayer that only has an id

0 Likes 0 ·
tweekley5 avatar image tweekley5 commented ·

@Gosen Gao additionally to this, you said , “ So it's a static result of a specific match, not the state of the server.”

What does this mean? If players are joining and leaving a match, shouldn’t the GetMatch stay current with that state? I’m not looking for the state of the server, but instead the state of the current list of players and their team assignments.

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao tweekley5 commented ·

For comment 1:

By maintaining a list of connected players, you can know which players are connected. Then you can use the corresponding info in GetMatch result to create a server backfill ticket request.

For comment 2:

PlayFab doesn’t have API for players to leave a match. Once the matchmaking is done, it is a static result. The client can get the match results to know which players they will be playing against, and the server can get the match results to know which players will connect. But sometimes, not all matched players connect to the server, they may fail to connect due to network issue or a crash. Since the server’s network(connection) logic is implemented by game developers, PlayFab has no way of knowing if a player is connected if developers don't provide this information to the GSDK. So, once you know the connected players(dynamic) and the GetMatch result(static), you can know the state of the current list of players and their team assignments.

0 Likes 0 ·
tweekley5 avatar image tweekley5 Gosen Gao commented ·

@Gosen Gao

I am still confused. How does this code example in the docs help establish what the teams are if GetMatch doesn’t return the players currently in the game?

 static private List<ConnectedPlayer> players = new List<ConnectedPlayer>();
    
 static void OnPlayerConnected()
 {
     // When a new player connects, you can let PlayFab know by adding it to the vector of players and calling updateConnectedPlayers
     players.Add(new ConnectedPlayer("player_tag"));
     GameserverSDK.UpdateConnectedPlayers(players);
 }

GetMatch only returns the initial matchmaked players with their team assignment, so if another player joins with a backfill, then I technically have no clue what team they’re on by using this list of ConnectedPlayers since all it stores is a string. That’s where my confusion is. How was a list of strings help me get all the information I need about players and their team assignment that is needed for the backfill ticket.

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.