question

Deekshith avatar image
Deekshith asked

Solution for mission system

I want to implement a global mission system where there will be a same mission for all the users and they will be contributing to the mission.

eg: Consider a mission "Kill 10000 enemies"

So when a player kills enemies it should be updated somewhere and all the users can see the progress of that missions as well. So if in total all the players have killed 5000 enemies then when the users open the mission page they should be shown the mission progress as 5000/10000.

How can this be implemented? Can we store these values in "Title data" but to note these values will be updated frequently?

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

·
Sarah Zhang avatar image
Sarah Zhang answered

While Title Data is a type of global data, but we would recommend not to use it as global variables. It’s not suitable for the mission progress count in your scenario. Title data should not be updated as a result of a user's actions. Besides, as the doc Title Data said, Title Data values are copied and distributed to potentially hundreds of machines in the PlayFab server cluster. As part of this process, Title Data is cached, and changes may take up to fifteen minutes to refresh in those caches. Title Data is best suited for "global constant/static data" and is not suitable or reliable as "global variables".

In my understanding, in order to ensure your gameplay, you need to count the mission’s progress in time. For such counting features, an external cache(like Redis) is a recommended workaround. Title data is suitable for storing static values such as missions’ names and the total number of missions’ requirements.

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.

Deekshith avatar image Deekshith commented ·

Okay, Thanks!

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.