question

pszymczyk avatar image
pszymczyk asked

Reset statistics from CloudScript,Statistic reset by cloudscript function

Hello,

I'm making simple board game. One of the modes, would be online room, where people can join and during for example 3 minutes try to achieve best possible score. After that time, they should get highscores of last 3 minutes.

The next 'join room' call checks endtime of last room and if it ended, it creates new one by incrementing id version of room and resetting statistics.

Cloudscript doesn't let me use adminapi, is there any other possible solution?

,

Hello,

I'm trying to create a simple board game. One of the modes would be 'online' room, where people join and during, for example, 3 minutes, try to achieve best score. After that, they should pull statistics only from last 3 minutes, when this room was active. There would be only one room, which will be identified by Id and EndTime. When it ends, next 'join' call should just increment id of room and reset statistics.

I thought, that resetting statistic, by incrementing version would be the best option. However, it is impossible from cloudscript, because it is Admin API call.

Is there any other solution?

CloudScriptLeaderboards and Statistics
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.

pszymczyk avatar image pszymczyk commented ·

I thought, that my message wasn't posted, so I tried again, and now I see it has doubled. Sorry for that.

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

For what you've described, I would recommend using either Photon Realtime or a custom game server. The Photon Realtime Room or custom game server would be the "room" you describe, which players could join and try to get the high score. It would maintain the data on the player scores for the three minute period, and providing the appropriate rewards via Grant operations at the end of that time period.

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.