question

jahelmer4 avatar image
jahelmer4 asked

How do I actually add latency to my Matchmaking Ticket?,How do I put latency in the matchmaking request?

I can't seem to find any documentation of how to actually add latency, just that I need to. Here's my code if that helps answer: PlayFab::MultiplayerModels::FCreateMatchmakingTicketRequest request; request.GiveUpAfterSeconds = 30; request.QueueName = TEXT("Testing"); request.Creator = PlayFab::MultiplayerModels::FMatchmakingPlayer(); request.Creator.Entity.Id = PLoginResult.EntityToken.Get()->Entity.Get()->Id; request.Creator.Entity.Type = PLoginResult.EntityToken.Get()->Entity.Get()->Type;

         multiplayerAPI->CreateMatchmakingTicket(request,
             PlayFab::UPlayFabMultiplayerAPI::FCreateMatchmakingTicketDelegate::CreateLambda([this](const PlayFab::MultiplayerModels::FCreateMatchmakingTicketResult& Result) {

,Hey, there's some questions on this but I can't seem to find any documentation of how to actually add latency to the Creator attributes. Any help would be appreciated. Here's my code without it if that helps answer. Thansk!

 PlayFab::MultiplayerModels::FCreateMatchmakingTicketRequest request;
         request.GiveUpAfterSeconds = 30;
         request.QueueName = TEXT("Testing");
         request.Creator = PlayFab::MultiplayerModels::FMatchmakingPlayer();
         request.Creator.Entity.Id = PLoginResult.EntityToken.Get()->Entity.Get()->Id;
         request.Creator.Entity.Type = PLoginResult.EntityToken.Get()->Entity.Get()->Type;
    
         multiplayerAPI->CreateMatchmakingTicket(request,
             PlayFab::UPlayFabMultiplayerAPI::FCreateMatchmakingTicketDelegate::CreateLambda([this](const PlayFab::MultiplayerModels::FCreateMatchmakingTicketResult& Result) {
Matchmaking
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

·
Neils Shi avatar image
Neils Shi answered

First, when you configure the queue, you should add a Region selection rule. 5493-thumbnail-image.png

Here is a sample of how to add latency to Matchmaking Ticket.

 POST https://{
                 {TitleId}}.playfabapi.com/Match/CreateMatchmakingTicket
  {
      "Creator": {
          "Entity": {
              "Id": "A8140AB9109712B",
              "Type": "title_player_account",
              "TypeString": "title_player_account"
          },
          "Attributes": {
              "DataObject": {
                  "mu": 16.0,
                  "sigma": 1.8,
                  "Latencies": [
                      {
                          "region": "EastUs",
                          "latency": 150
                      },
                      {
                          "region": "WestUs",
                          "latency": 400
                      }
                  ]
              }
          }
      },
      "MembersToMatchWith": [],
      "GiveUpAfterSeconds": 2,
      "QueueName": "ServerEnabledQueue"
  }

Please note that the "Latencies" (which in Region selection rule) must match the "Latencies" of Attributes in CreateMatchmakingTicket. For more details, please refer to Region Selection rule.


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.

jahelmer4 avatar image jahelmer4 commented ·

Is it possible to do this in C++?

0 Likes 0 ·
Neils Shi avatar image Neils Shi jahelmer4 commented ·

Since you asked the same question in another post, I will answer this question in that post.

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.