question

lmgualandi avatar image
lmgualandi asked

Periodical cloud script?

I was wondering if there is a way to execute periodical scripts on server side. E.g run a script every 3 hours. Play stream does not have an event for this according to the docs.

My case: I have an asynchronous multiplayer game. Players have a fixed time to complete their moves. If they take too long, the other player is declared winner. When a player has little time to complete his move he must be notified.

Worst case scenario I use my own server to query the playfab API. Do you have any other solutions?

thanks

CloudScript
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

I'm hearing two different things in this, so I'll address each:

1. We will be releasing bulk actions for segments in the near future, which will allow you to set up an Action (which could be a script) that runs on a set schedule, iterating through all the players in a Segment (which could be "all users") and does something. However,

2. The specifics of your design is really focused on multiplayer interactions. Rather than have that tied to a global scheduled action, you really want to drive that based upon the individual interactions - otherwise, it feels somewhat arbitrary, since the time to the end of a session could be a few minutes, or it could be hours. We do plan to add more capabilities for asynchronous games in a future update, including an arbitrary message system. For now, our recommendation would be to either use a custom game server or PlayStream to help manage your multiplayer sessions. Have a look at this thread for some ideas on how you could accomplish that: https://community.playfab.com/questions/515/207129407-Persistent-turn-based-games-.html

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.