question

Mervin Guy Jr avatar image
Mervin Guy Jr asked

How do clients and servers synchronize game state? (using Unity),

I am an indie dev making a multiplayer game and am new to PlayFab. I went through a majority of the API and cannot find how the game-server and client synchronize game-state. I am not sure if this is a feature I must implement separately or if PlayFab has API for it (I was previously using Mirror which had built-in sync). If API does exist, may I please get a link or brief explanation?


Any help will be greatly appreciated.

,

apissdksmultiplayer
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

·
Seth Du avatar image
Seth Du answered

PlayFab and Mirror are designed for different purposes. PlayFab is a service based on Restful API and is suitable for a near-time game design, for example, turn based game can be implemented without hosted multiplayer server, please refer to Using Shared Group Data - PlayFab | Microsoft Docs.

I believe you are also looking for real-time data sync and it should be implemented in Multiplayer server of PlayFab, which supports Unity Mirror. Please refer to the document on Multiplayer with PlayFab - PlayFab | Microsoft Docs and feel free to try our Mirror sample on GitHub - PlayFab/MpsSamples: Samples that show how to use PlayFab's Gameserver SDK for Multiplayer Servers.

Please feel free to let me know if you have any other questions. The game design may change a lot if you want to migrate a game from real-time to near-time.

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.

Mervin Guy Jr avatar image Mervin Guy Jr commented ·

Thank you so much for the response, I heard that it takes long for replies so I was going to let it sit for a week but the quick reply was appreciated.

I will read and research using the two reference you gave as a launchpad. It is really relieving to hear PlayFab Multiplayer servers support Mirror since I am comfortable with it.

If I have any further questions I will post on this thread, and check earlier for replies. Thanks again.

1 Like 1 ·

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.