question

Mickael Bonfill avatar image
Mickael Bonfill asked

Sync PlayFab and Google Play Games / Game Center data

Hello,

I am using the Google Play add-on from the marketplace that is useful for Sign-In/Linking social account with PlayFab Player account. I was wondering what is the best way to achieve a kind of synchronization between PlayFab and external services like Play Games or Game Center?

Let's say I have set up an achievement in Play Games, that can be unlocked when a player finishes his very first game.

The logic behind would be to have "played_games_count" leaderboard, initialized at 0 when a player account is created (using a Rule), and each time a game is over, the client sends an Event to update statistics. To keep track of new players, I also created a Segment "New players" with the condition "played_games_count == 0".

Maybe a CloudScript triggered when the player is going out of this Segment would help, in order to notify the client about this new progression. Then the client could make some calls to the social platform to update the progression on their side too.

I just feel a bit odd to have to manage the same data on several services, which creates a kind of denormalization and could generate an inequality between services if some calls fail.

I am pretty sure some people here has encountered this real world scenario, so I just want to get pieces of advice about the subject of sync things together.

Thank you.

unity3dCloudScriptLeaderboards and Statistics
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

>> an achievement in Play Games, that can be unlocked when a player finishes his very first game.

According to the description, you want to use segment to handle this achievement for a completely automatic handing procedure. It is feasible, but to unlock Google Play/iOS achievement, you may need additional implementation, like integrating Google Play Game service web API on Azure Function for server-to-server interactions. In terms of iOS, I’m not sure if server-to-server is allowed, please find support from Apple developer community.

If you have concerns about sync issues, you may store the all achievement progresses of a player in Player Read-Only Data or Internal Data for verification and synchronization.

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.