question

sickshark avatar image
sickshark asked

Custom Data in Leaderboard ?

Hello,
We have a little game with simple leaderboard and keep in mind we would like to remain in the free tier (this is why we opted for playfab).
In our game we have a per-player "house of achievements" where a player can see:
-his best score
-diamond collected
-enemies killed
and can personalize this house so:
-The roof can be [Red, yellow, blue..]
-number of windows [1,2,3 or 4]
-type of door [little medium or big]

now I ask you a question:
I read many different boarder-line solutions as well as not-allowed solution and I have been reading that custom data in leaderboard would have been implemented (one year ago), so, what is the best and clean way to allow a player to visit and see another player's "house of achievements" ?

Also, this data is stored for free on Playfab or requires hidden extra costs? we want this to be clear and easy.
Thank you !

Leaderboards and StatisticsCustom Game Servers
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

·
brendan avatar image
brendan answered

Last question first, there are no hidden costs in PlayFab. Anything with a cost is stated in the Game Manager. If you're in the free tier, that means that only the upgrades or add-ons you specifically choose to use, as well as CDN and server hosting use, would have fees.

Now, as to data in leaderboards - that has been in place for quite some time, now. The player profile is returned for each player in the leaderboard, based on what you allow to be returned to other players in the settings, and what you request using the profile constraints. In your example, you can have all the statistics for the player returned with each leaderboard, so you could then use that data to build the rich leaderboard list you describe. Assuming the player only has one house, you could use one statistic to encode the information about the house - use the minimum number of bits for each aspect of the house.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sickshark avatar image sickshark commented ·

Thank you Brendan! But I still have some concerns:

1) You state a client shouldn't update the statistic for cheat prevention. Then what do you suggest instead ? (is not written in the tutorial) Call the cloud script and update the statistic from there? and how is it safer? What should I check ? and there is not a limit? I can't see which is the limit i should look at.. "CloudScript execution API requests issued (triggered action)" or "Player data updates per request" or "Character data updates per request" (I don't understand the difference between the two and if Stats updates fall in one of these, can't see stats update limit)

2) If we reach the limit in some values, we will be charged without notice or simply, api calls will be refused if capped?

3) As long as I understand a stat can only be an INTEGER right? (not string) so you suggest me to create a statistic like 00-00-00 where first two numbers are the color of the roof, the second two are the number of doors and so on ? cool!

I don't know what practically to write for cheat prevention..

Thanks in advance!
0 Likes 0 ·
brendan avatar image brendan sickshark commented ·

In general, we would suggest using Cloud Script to update statistics, yes. That way, you can have your own server-authoritative logic that checks things like the upper/lower limit of the score, the time since the last score report, etc. What things you check is going to be somewhat game-dependent, beyond that.

I'm not sure what you mean by "and there is not a limit", though. It's not possible for any feature to be infinite, as the costs would far exceed what's sustainable. Here's a general guide to the limits in the free vs paid tiers: https://community.playfab.com/questions/13455/limits-for-pro-tier.html

Stats are not player or character data updates. They are distinct. The expectation is that a single stat will not be updated more than occasionally.

For 2, no, if you encounter a limit, the calls that try to exceed the limit will simply fail.

For 3, yes, stats are int32 values. And yes, I was suggesting using one as a bitfield.

0 Likes 0 ·

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.