question

Gelo Martinez avatar image
Gelo Martinez asked

How to create a resource gathering node for all the players using PlayFab,How to use playfab on creating a resource gathering node?

Hi,

I want to ask a question regarding on how I can approach resource gathering node that can be used by all the players inside that world. For example, I have a resource gathering node (like stone, wood, etc.) that has a maximum capacity of 100. If a player gathers from that node, the capacity will diminish by 5. The new value of that resource node should reflect to all the players. If the maximum capacity falls of by 50%, the resource node should start a timer (ex: 5 mins in real time) to refill that node.

I want to know if this is possible with PlayFab and how I can utilize it.

Thank you for your help.

,

Hi,

I have a question regarding on how I can use playfab to create something like a resource gathering node (like stone, gold, lumber, etc) that updates to the all players inside that world. For example, I have a resource gathering node that has a 100 maximum capacity. Every time a player gathers on that resource node, the resource node capacity diminish by 5 (for example only) and the value of that node should update to all the player. Then if the resource gathering node drop by 50% of its maximum capacity, a timer will start for that node that will refill it after 5 mins.

For reference, I have looked into this thread

Timer countdown in server

Thank you for your help.

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

·
Rick Chen avatar image
Rick Chen answered

It is hard to achieve this in PlayFab, as you may want to implement a lock that allows only one player to modify the data (gather the resource) at a time, otherwise the data could be messed up when multiple players are trying to modify it at the same time. It would be better to implement it in a server, and after a game or when the players leave the game, update the resource that the players have gained to PlayFab.

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.