question

Ivan Kozka avatar image
Ivan Kozka asked

Starting play to the game

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.

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

·
Made Wang avatar image
Made Wang answered

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.

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

Ivan Kozka avatar image Ivan Kozka commented ·

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?

0 Likes 0 ·
Made Wang avatar image Made Wang Ivan Kozka commented ·

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.

0 Likes 0 ·
Ivan Kozka avatar image Ivan Kozka Made Wang commented ·

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?

0 Likes 0 ·
Show more comments
Made Wang avatar image Made Wang Ivan Kozka commented ·

Can you also share your matchmaking queue and the player data passed in when you created the ticket?

0 Likes 0 ·
Ivan Kozka avatar image Ivan Kozka Made Wang commented ·

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

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.