question

berndhodl avatar image
berndhodl asked

Best practice transfer usermodel to playfab?

We have an existing offline game that stores the whole userdata in one big JSON.

To prevent players from manipulating the savegame and timecheating we want to move all persistent playerdata to playfab.

Pushing the whole savegame(about 200kb) on each useraction is probably not feasable.

Obviously the best way would be to dissect all the data and make individual save calls, but that would mean a lot of work.

Is there an easy way to compare 2 datastructures or JSON files and only upload the difference?

Any help or guide on how to move an existing game to playfab would be very much appreciated :)

Player Datadata
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

·
Sarah Zhang avatar image
Sarah Zhang answered

Do you mean your original game is a pure offline game, every player’s data is stored locally, and you need to upload them to PlayFab? For clarification, currently, it’s not supported to migrate the user accounts from external storage systems to PlayFab titles. The possible workaround is to give them a button to let the players register the game accounts to the PlayFab title on their own and upload the data. Players can upload the game save files as the entity files whose file size allowed to be 200kb, you can check this documentation – Entity files - PlayFab | Microsoft Docs to learn about to how to upload the entity files to PlayFab. If you want to compare 2 JSON files and only upload the difference, you will need to develop the custom server or the administrative tool to implement this feature on your own. Then you can upload the differences using the above methods for players on the server-side.

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.