question

lkenn78 avatar image
lkenn78 asked

Statistics vs Title Data (Player) - Am I putting data in the right place ?

I'm working on some data I/O at the moment and have some questions.

What is the difference between "Statistics" and "Title Data (Player)" ?
Would I be correct to say that "Statistics" can only store string (key) and int (value) data, while "Title Data (Player) allows for string (key) and string/int (data) ?

So in which case I may store achievements/leaderboards (high score, # of kills, # of coins) in Statistics while I would store strings (character name, city of origin) in Player Title Data ?

Much thanks.

Title Data
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

In each case, it's key/value pair, but the tThe essential difference is that player data is arbitrary string/string, while statistics are numeric values (string/int32). In addition, all statistics are leaderboards in PlayFab, and statistics have multiple aggregation methods you can use (https://playfab.com/new-aggregation-methods-for-statistics/).

So, strings would be stored in player data (or Content, if you need to store more data than fits in player data), while numeric data could be statistics, but the deciding factor there is usually whether or not you need leaderboards for those value. If not, you could just store them as part of string-formatted JSON data, so that you can pack all the numbers that don't need leaderboards in with the other string-formatted data (fewer, larger keys are the way to go - you wouldn't want to store each numeric value in its own player data key).

But one other note - "coins" are usually best stored as a virtual currency, in the Economy section of your game. That way, you can use the secure purchasing systems to transact the currency for items from your game catalog.

1 comment
10 |1200

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

lkenn78 avatar image lkenn78 commented ·

Thanks @Brendan . Very clear explanation.

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.