question

ivan-ivan avatar image
ivan-ivan asked

Unity Mirror + Playfab Party

Hello! I have a small multiplayer game for 2-5 people (small square arena with players) made on Unity + Mirror. Now it only works locally. I want to add online. After examining your services and offers, I realized that it is best for me to implement data transfer (only player movements and the use of super powers) through Playfab Party (peer-to-peer).

I have studied your documentation, but I have a few questions, please help me figure it out:

1) How can I link my game logic on Mirror to data exchange via Playfab Party?

2) How can I connect to Playfab Party? I realized that in order to connect to Azure servers, you need to assemble a server build, and make a call to it on the client side. But I need to connect to Party and I don't understand how to do it.

3) How do I implement matchmaking? I need to auto-connect to hosts that have free places and it is desirable to filter them by ping level. If there is no host or everyone is busy, then the player himself becomes the host. Please tell us step by step how and through which services I can do this.

PS: I use your platform for the backend and it works great, thanks!

multiplayerdocumentation
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-ivan avatar image
ivan-ivan answered

Can you answer me?

10 |1200

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

Seth Du avatar image
Seth Du answered

Party and Mirror are independent services.

In the common scenario, we only consider the linkage between Mirror and PlayFab Multiplayer Server because PlayFab provide hosted server while Mirror is a high-level networking API.

PlayFab Party is a standalone solution for a low-latency chat and data communication, and it is serverless service hosted by Azure. According to my testing experiences, I don't see there is direct implementation for them.

1) As they are independent, I don't think it is a common scenario. If you are Xbox Developer, please feel free to find help in Xbox Developer forum.

2) Please refer to the document on Getting started with Azure PlayFab Party - PlayFab | Microsoft Docs to implement Party.

3) If you enable Auto-allocation for Matchmaking queue, when tickets are matched, an instance will be turned into Active. Since you are using Mirror, clients can connect to the server via the IP & ports returned by GetMatch API call. The rest of requirements seems be server-side logic, you may need to implement it on your own. PlayFab multiplayer server is dedicated hosted server, and it is not self-host service. Changing the "host" in a server build will be like changing a value or tag for a player.

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.

ivan-ivan avatar image ivan-ivan commented ·

On your site, it says: «Peer-mediated designs synchronize multiplayer state by promoting a single “authority” client to make decisions, or through a consensus process between all clients. Both require a peer-to-peer networking system to exchange messages. Party is designed to be a simple, reliable, secure, low-latency transport for this kind of peer-mediated multiplayer activity. Azure relays and PlayFab encrypted communication help protect players from network attacks on each other or on game data. Party is a fully managed service and auto-scales across Microsoft’s Azure global cloud, providing low latency and low administrative overhead.» (https://blog.playfab.com/blog/announcing-playfab-party)

I have a mobile p2p game. I need to connect to your network via Party, and create rooms and connect players to them (5 players per room). How do I do exactly that?

Matchmaking queue works with Party? If not, how do I implement matchmaking and ping filtering?

https://www.youtube.com/watch?v=z40-nBJsc74 This video of yours also says that you can exchange data through Party.

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.