question

Duc Nguyen avatar image
Duc Nguyen asked

Storage plan Player Data Read Only Data

Hello Everybody,

I have a problem designing the system:

Let the players in the game see each other's game result information. I want to save player information from Statistics to Player Data (Title) Read Only Data. Write Player Data information (Title) Read Only Data every time Statistics is updated. There are about 20 statistic values that need to be saved to Player Data (Title) Read Only Data. Each time the Client updates 1-2 values in the total of 20 value Staticstics, Cloudscript will confirm and record 1-2 Statistics values, and update that value to Player Data (Title) Read Only Data. However, I had a problem with the solution. The question here is, I have 2 options:


1. Save 20 Statistics values to Player Data (Title) Read Only Data in Json format. each time the Client updates 1-2 values of the total of 20 value Staticstics, Cloudscript will confirm and record 1-2 Statistics values, and will read all 20 Statistics values and write to Player Data Read Only Data (Json).


2. Save 20 Statistics values to Player Data (Title) Read Only Data in the form of 20 Key / Value. Each time the Client updates 1-2 values of a total of 20 value Staticstics, Cloudscript will confirm and record 1-2 Statistics values, and will read and record 1-2 Statistics values to Player Data (Title ) Read Only Data.


How should I use it? Thank you

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

The only real question that needs to be asked here is, how are you trying to see the data for a given player, across other players?

When it comes to statistics, the player profile returns the other statistics for the player on any leaderboard query (or friend list request). So if the goal is to use that information for a rich leaderboard display, that's all you need.

If you need to have data that's to be used for one-on-one interactions, like a player finding the "city" definition for a game where each player has a city and other players can attack it, you could use a combination of player data and statistics.

What does not work is creating player data on a single player, and then trying to have a large number of players trying to read that data. Player data is designed to be used for a single player. It can be used in cases where a small number of players are reading or acting upon it. But for a system where thousands or millions of players need to act upon the data, player data isn't the right place for that. Title data can be a read-only source for data to all players, but it cannot be updated by player actions.

So the specifics of your game feature design are fairly critical to being able to provide you with substantive feedback.

11 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.

Duc Nguyen avatar image Duc Nguyen commented ·

Maybe you misunderstood my idea. Players can choose modes: Hard, Normal, Simple. Each type I will save the number of games won. The above 3 indicators are included in the ranking. When other players click on my profile, they will see 3 modes: Difficult: 10, Normal: 13, Simple: 19. I think the above information must be taken from Statistics to Player Data Read Only.

0 Likes 0 ·
Duc Nguyen avatar image Duc Nguyen commented ·

These are indicators of the games that the player has won. Saved to Statistics to calculate for Leaderboard. However, I also want to show it to other players when they see the information

0 Likes 0 ·
Duc Nguyen avatar image Duc Nguyen commented ·

Because I know that: Statistics cannot be viewed by other players

0 Likes 0 ·
brendan avatar image brendan Duc Nguyen commented ·

Sorry, but what makes you think other players cannot see the statistics? A player in a game can get stats for other players either from a direct query or through the profile information returned on leaderboard calls and friend list requests.

There shouldn't be any need to additionally save these stats as data.

1 Like 1 ·
Duc Nguyen avatar image Duc Nguyen brendan commented ·

Yes. I did not find any instructions on viewing other player statistics. Can you guide me?

0 Likes 0 ·
Show more comments
Show more comments

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.