question

Brandon Lemky avatar image
Brandon Lemky asked

How To Store Global Data

Player Datadata
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.

Brandon Lemky avatar image Brandon Lemky commented ·

Hi, i'm very new to Playfab in Unity, and i was wondering how one would go about storing temporary data that all players will download automatically?

I'm making a soccer betting game, and there will be public betting pools that anyone can join. How do i make it so these pools are downloaded automatically when the player checks the pools? Also, how do i remove them after awhile? Again, sorry, i'm new to Playfab and honestly have no idea how any of this is done haha.

Thanks

0 Likes 0 ·
Gosen Gao avatar image
Gosen Gao answered

PlayFab has Title Data which can be accessed by all players, but considering the write conflict of multiple requests, it is mostly used to store data that is not frequently modified. if it doesn't meet your needs, you may need external features like Database to prevent the write conflict to help you store global data, for example, Cosmos DB.

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.

Brandon Lemky avatar image Brandon Lemky commented ·

Oh sorry, I didnt get a notification and didn't know anyone responded haha. The only thing that will really be changeable by other players is each player will be able to "join" a pool or a bet, and cast their bets. So, the only thing that will be modified by each player is the "bets" and the player number. A pool and a bet will be global, there will be public pools and bets, and private ones that you can only play with friends.

Do you think this would work with Title Data? I don't really know what conflicts would arise, maybe i could check if the data is being modified, and freeze the player's bet submission until it's finished? I don't know if that would be ideal, because someone could fall asleep while submitting and the other players would never be able to submit haha. Sorry I'm a total noob. Never used Playfab at all.

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Brandon Lemky commented ·

I think the Title data cannot meet your needs. As the document mentioned, Title Data is cached, and changes may take up to fifteen minutes to refresh in those caches. And there is no implementation to check the data's status. For your scenario, you need an external Database to help you store the global data.

0 Likes 0 ·
Jhon Albert avatar image
Jhon Albert answered

Your title are about store global data, for which type of database you can asking for?

10 |1200

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

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.