question

Danielle Eliav avatar image
Danielle Eliav asked

Realtime multiplayer with private and public matches?,Multiplayer game with friends or random players

Hi!

I'm working on a realtime multiplayer card game in Unity and am unsure of the best way to continue.

I want players to be able to create a private room with a code that their friends can enter to join the game or join a public game with other users. I also want players to be able to see who has joined the game they are in in a lobby.

Does playfab matchmaking have a lobby? If not, how do I integrate the matchmaking with Mirror's lobby.

Do I need to keep track of current matches? What would be the best way to do that?

Do I need to use Unity's NetworkMatchChecker to separate the matches?

This is my first game and any help would be really appreciated!

Thank you!

,

Hi,

I'm building a real-time multiplayer card game in Unity and am a little unclear on the best way to do it. I want players to be able to create a private game with a code that their friends can enter to join or to just join a public game with other online players. I want players to be able to see who else is in the game once they join in a lobby.

Does Playfabs matchmaking have a lobby? If not, how do I integrate it with Mirror's lobby?

How do I keep track of the games, especially the private ones?

Do I need to use Unity's NetworkMatchChecker to separate the matches?

This is my first game and any help would be appreciated!

unity3dMatchmaking
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 answered

If you want to develop a real-time multiplayer game, we would suggest you consider using PlayFab Multiplayer Servers (server hosting service) with PlayFab MatchMaking together. PlayFab's multiplayer server hosting service allows you to operate a dynamically scaling pool of custom game servers in Azure. PlayFab MatchMaking provides a system to help your users find each other. Please check our documentation for more details.

>> Does playfab matchmaking have a lobby? If not, how do I integrate the matchmaking with Mirror's lobby.

No, PlayFab MatchMaking doesn’t provide the lobby feature. PlayFab MatchMaking is used to group players depending on the custom rules. If you need a lobby system, you need to develop the lobby server on your own and host the server builds on the external server hosting service.

Theoretically, PlayFab multiplayer API can be used in any custom server with the other network features. So it can be used with Unity Mirror’ lobby feature together.

I’m not familiar with how Mirror implements the lobby feature. There is not an out-of-box solution about using MatchMaking with Unity Mirror. The specific integration method would depend on your own design. If you meet any exact technical questions in the progress of using the MathcMaking API. Please feel free to let us know.

>> Do I need to keep track of current matches? What would be the best way to do that?

Do you want to record all matches’ status and show them to the players? PlayFab doesn’t provide the API to list all matches in the server, so you need to record the matches, matchmaking tickets on your own. We would suggest to use external cache, such as Redis, to store them.

>> Do I need to use Unity's NetworkMatchChecker to separate the matches?

For clarification, PlayFab Matchmaking has nothing to do with the Unity Mirror’s Matches feature. As our documentation – Matchmaking says “When an individual or group wants to enter a match, your title submits a request to the matchmaking service. Once the request is made, the service will hold on to the request and try to match it with other requests. The service then creates matches that contain players who are most compatible.” The full process of MatchMaking would be completed by our own service.

When you use the PlayFab MatchMaking feature. Clients only need to use CreateMatchmakingTicket to send a matchmaking request via creating a ticket, then they need to loop calling the API GetMatchmakingTicket to check the status of tickets. Once the status changed to the “Matched”, GetMatchmakingTicket would return a MatchId to the client. The clients can call the GetMatch to get the detailed info of the match. If you integrated the Multiplayer server with the MatchMaking, the allocated server’s IP addresses and port number would be returned by GetMatch API.

You can use the PlayFab API with other third-party API methods according to your exact needs.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Derek Reese avatar image
Derek Reese answered

Hey @Danielle Eliav , PlayFab now has a Lobby feature! You can get going with it by checking out our Quickstart: PlayFab Multiplayer Lobby Quickstart - PlayFab | Microsoft Docs

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.