question

Thong Nguyen avatar image
Thong Nguyen asked

Get friends data

Hi, I'm creating a game alike Candy Crush. I want to know my friend's current level (like in the picture). Right now I'm storing a variable "playerCurrentLevel" in each PlayerData and in the loading scene I GetFriendsList and then use "FriendPlayFabId" to get "playerCurrentLevel". Is this the proper way of doing this? Because if I have like 500 friends or more this could be time consuming.

capture.png (296.3 KiB)
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

Since interactively call GetUserData may exceed the limits, I suggest you to implement the “playerCurrentLevel” in player’s statistics, which means you can retrieve all the data via one call GetFriendLeaderboard.

Besides, you are still able to use player data to store “playerCurrentLevel” but you need to concern about the request frequency. Event-triggered method will be preferred, which means only when some action is performed by the player, will the “playerCurrentLevel” data be refreshed. Otherwise, you may slowly refresh the whole data in the background of your client app.

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.