question

Khiem Nguyen avatar image
Khiem Nguyen asked

What should I use to handle player'map data?

Hi,

We are developing a simulation game which the player can design their own shop.

The shop layout will be saved in a JSON file.

What feature in Playfab should be used in that case? Player Data or Player Statistics?

Thank you!

Player DataPlayer Inventory
3 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.

Khiem Nguyen avatar image Khiem Nguyen commented ·

More information: The player can visit the other's shop then the shop (map) data should accessible from another client.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ commented ·

Player Data can be a better choice. The data in player statistics will show at leaderboard.

0 Likes 0 ·
Khiem Nguyen avatar image Khiem Nguyen commented ·

@SethDu you right. It look like must code in Cloud Script to get data from other player.

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

Can you describe the use case more completely? How often would players need to access each others' shop data? How do they discover other player's shops to view? How would they make purchases from those shops (the Trading APIs, maybe)? What's the worst-case scenario for how many people might be trying to access a single player's shop at a time?

Player data can work fine if you're certain that the rate isn't going to be high. But if players are discovering each other's shops via something like the leaderboard, there's a risk that you might have many players trying to hit the player in position 1 all at the same time, which would cause performance issues. A single player's data can queried by a small number of players at a time, it's relatively safe to have a few players trying to update it, since the odds of simultaneous requests is low. But beyond a few players, you would start to run into issues.

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.

Khiem Nguyen avatar image Khiem Nguyen commented ·

Thank for your answer.

The player will hit a button and view the shop of a random player. And they can view a friend's shop everytime they want. The player just can see the shop and can't buy anything here (just view it) and can rate the some in star (from 1 to 5).
I noticed Player in Playfab have "Object", is it useful in this case.

0 Likes 0 ·
brendan avatar image brendan ♦♦ Khiem Nguyen commented ·

If it's random, presumably you're getting the leaderboard around the current user and picking someone (other than the local user) at random from that set of 100? Or are you doing something else? If you're sure there's no opportunity for many calls to be hitting a single player's data at once, you should be fine, though.

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.