question

karolkamilorlowski avatar image
karolkamilorlowski asked

Run game with implemented Playfab offline

Hi,

I have implemented Playfab in my game only for Leaderboard (create user , send and receive data)

If player is offline or has bad internet connection, the game freezes.

So I'm tryin' to make offline mode without internet connection , players score will be saved locally and will be sent when Playe will be online.

Does exist some easy way for disable API using some code?

Thanks!

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

·
brent-rynders avatar image
brent-rynders answered

Hey

Updating the player score from the client means that the server isn't in control of the score.

This means that players can cheat and upload cheated scores.

I would suggest disabling the leaderboard functionality if the player is offline and then giving the player a warning message that tells them to go online for leaderboard functionality.

If cheating isn't an issue, then have a look here:
- https://learn.microsoft.com/en-us/rest/api/playfab/server/player-data-management/get-leaderboard?view=playfab-rest
- https://learn.microsoft.com/en-us/rest/api/playfab/server/player-data-management/update-player-statistics?view=playfab-rest

If you want to disable the calls to the api, I'd suggest having some sort of mechanism that checks if the player is connected before you make any calls via the SDK.

It's hard to say what exactly you need to do here without seeing your scripts.

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.