question

appgame avatar image
appgame asked

GetMatchmakingTicket - Lobby Game - Revised

Hello:


Fixes the 120 second app Player Retention.

Gamers can enter or leave Lobby without being players in the game.
Gamers can watch or wait for a turn in an up and coming game.

Waiting Gamers can also do side games while still in the Lobby.



Creating a Playfab GetMatchmakingTicket->> Player Gaming Lobby..


Your API References on Match/GetMatchmakingTicket Result should include,
Members - MatchmakingPlayer[] - A list of Users that have joined this ticket.


My Result List of Users Length is only 1,
Members: Array(1)0: {Entity: {…}, Attributes: {…}}length: 1


Complete List of Users in the GetMatchmakingTicketResult,

"Attributes": {
        "DataObject": {
           "GameMode": GameMode,
           "DeviceToken": DeviceToken,
           "PlayFabId": LoginCredentials.PlayFabId
        }
}


DeviceTokens = [];
PlayFabIds = [];
Members = Return.data.Members;

for(i=1;i<Members.length;i++){
	DataObject = Members.Attributes.DataObject;
	DeviceTokens[i] = DataObject.DeviceToken;
	PlayFabIds[i] = DataObject.PlayFabId
}

function UpdatePlayerMove(){
   for(i=1;i<PlayFabIds.length;i++){
	BODY = {
	   "Recipient": PlayFabIds[i],
 	   "Package": {
 		"Message":"Moved Game Piece",
 		"Title":"title",
 	   }
	}
	/* Send Move To Each Device */
	ExecuteRequest( "Server/SendPushNotification", BODY )
   }
}


3 or More Players Match that has only one Member.

{
"code":200,
"status":"OK",
"data":{
    "TicketId":"",
    "QueueName":"2_Player",
    "MatchId":"",
    "Created":"2020-06-28T01:03:05Z",
    "Status":"Matched",
    "GiveUpAfterSeconds":120,
    "Members":[
        {
            "Entity":{"Id":"",
            "Type":"title_player_account",
            "TypeString":"title_player_account"},
            "Attributes":{
                "DataObject":{
                    "GameMode":"Beginner_Level",
                    "DeviceToken":"",
                    "PlayFabId":""
                }
            }
        }],
    "Creator":{
        "Id":"",
        "Type":"title_player_account",
        "TypeString":"title_player_account"
    }
}
}
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.

Sarah Zhang avatar image Sarah Zhang commented ·

Could you please clarify your exact questions again? If you have multiple questions, please number them, like

  1. xxxx?
  2. xxxxx?

Thanks for understanding.

0 Likes 0 ·
appgame avatar image appgame Sarah Zhang commented ·

≤≤ Deleted ≥≥

0 Likes 0 ·
appgame avatar image appgame Sarah Zhang commented ·

≤≤ Deleted ≥≥

0 Likes 0 ·
Sarah Zhang avatar image
Sarah Zhang answered

For the first question, have you tried to call GetMatch API to retrieve the matched players in its Members fields? The Members field of GetMatchmakingTicket would mean the list of users that have joined this ticket. It is designed for the “teammates” rather than “opponents”. There is only one member in the Members field of GetMatchmakingTicket due to it is a one-player team.

We will continue to research for the remaining questions.

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.

appgame avatar image appgame commented ·

≤≤ Deleted ≥≥

0 Likes 0 ·
Sarah Zhang avatar image
Sarah Zhang answered

>> I had a complete list of players that joined the GetMatchmakingTicket. This Option has now blocked in the GetMatchmakingTicketResult.

Could you please tell us how did you turn on this option before? The Members field of GetMatchmakingTicket means the list of players in one team. The Members field of GetMatchResult means all players that be matched in a match. Only when you follow this section - Multiple user ticket matchmaking to let multiple players join in one ticket, the Members field of GetMatchmakingTicket would contain multiple players.

For example, if your match is a 1v1 or 1v1v1v1 match you can get all players that be matched from the Members field of GetMatchResult, in this situation, due to they are one-player teams, Members field of GetMatchmakingTicket only contains the one player(creator). If your match is a 2(blue team)v2(red team) match, they can get the teammate list from the Members field of GetMatchmakingTicketResult. They will get a two-player list that contains their own teammates.

>> GetMatch provides data for the Members[i].Entity. Members[i].Entity does not provide the required DATA to implement Push Messages by using the PlayerfabId or DeviceToken. Profile/GetProfile POST will retrieve PlayerfabId from using the "Entity.Id" in the Request Body.

Do you mean you want to send a notification to the players when this player has been matched with others? The solution you mentioned is a suitable way to do this operation in the game server. The PlayFabId is corresponding to the MasterPlayerAccountId. You can call the Entity API GetProfile in the server to retrieve their PlayFabId. Please let us know if you have other questions. We would suggest posting a new thread for the new questions. All new threads would be allocated to multiple supports engineers. Scattering questions is helpful to get more targeted responses.

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.