Hello!
At this stage I want to do create pvp. What I need for this solution?
I have two players where each create new matchmaking, and when I request status from GetMatchmakingTicketRequest, I get status is a WaitingForMach.
My question what I need to do that the game/match is start and status changed to Matched and I get Match Id, I need lobby or playfab server?
Thank you in advance.
Answer by Made Wang · Dec 30, 2021 at 08:51 AM
If you just need to match the players, you don't need a playfab multiplayer server.
You need to call GetMatchmakingTicket repeatedly after creating a matching ticket. You can call it up to 10 times per minute, and you need to perform this step manually. When the returned status is Matched, you can get the MatchId in the result, and then call GetMatch with the MatchId.
Refer to Matchmaking quickstart - PlayFab | Microsoft Docs for more information.
When I call GetMatchMakingTicket I get status WatingForMatch and after 120 second I get Status is Canceled. Where is happening matched between players at Lobby yes? otherwise, how will the players know that they have matched the parameters?
The time to cancel the match can be defined by setting the value of GiveUpAfterSeconds in the Request of the CreateMatchmakingTicket. As for the logic of matchmaking is handled by the matchmaking service, PlayFab developers and players can only obtain and manage the matchmaking status through the API.
And currently we do not have the function of lobby. If you need a custom lobby, you need to refer to this blog- Building Lobbies with Azure PlayFab to implement it yourself.
In addition, I read your thread, did you put two players in the same team?
If as a team, when the main player creates a matchmaking ticket, the remaining players need to call JoinMatchmakingTicket to join this ticket, and you need to create another team to create a matchmaking ticket so that you can start matching.
If it is 1V1, two players need to create their own tickets, and the PlayFab will match them, and then they need to call GetMatchmakingTicket repeatedly until the return status is Matched or Canceled.
No, I'm currently using 1 vs 1, I just watched a video of how the author created matchmaking through Unity, and everything is of course very simple and fast, but I use regular requests via HttpClient Console App and it seems to me there is some kind of restriction on this because it's not right here. It can't be that I'm creating a match waiting until the end and nothing is happening somehow it's all strange, isn't it?
Can you also share your matchmaking queue and the player data passed in when you created the ticket?
Thank you I solved my problem. I used two different TitleId, and accordingly I couldn't Matched players. And every time received status of WaitingForMatch