question

cjmaeder avatar image
cjmaeder asked

Where should world data be stored?

I need to store custom world data.

A single player can create multiple worlds.

All levels need to be able to be accessible by all players.

Where should I store the data?

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

Sorry for the confusion on this - Shared Group Data cannot be used the way you describe. Please see this post for a detailed discussion on this topic: https://community.playfab.com/questions/20602/creating-a-territory-war-game-like-like-lords-mobi.html

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.

cjmaeder avatar image cjmaeder commented ·

I guess I should have been more clear.

The data only needs to be updated when a player (the world owner) decides to save the data, which could be once every 5-10 minutes or once a year.

The data would need to be able to be read when the other owner is not online and really only needs to be loaded once per game instance.

Based upon the other thread, it looks like I should use entity data.

Thoughts?

0 Likes 0 ·
brendan avatar image brendan ♦♦ cjmaeder commented ·

Entity data is the most likely answer, but that's really based on the usage model. The original player data and Shared Group Data model (they're really the same thing under the covers - it's just that SGD doesn't have a player that is the "owner") was built for cases where a few players might be accessing the data in close proximity, time-wise. Entity data is better, and is designed for guild/clan/team type functionality, so dozens of players could be accessing it.

The caution is, if you have a system where players can choose the other player whose data they want to read, and there's any way for them to see a list of other players, you'll inevitably have situations where you have a popular streamer or a top player, who everyone wants to look at or act upon. In that case, you could have thousands of players all trying to access that data at the same time, which would be where you'd run into serious performance issues which should be avoided.

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.