question

Barry McCallum avatar image
Barry McCallum asked

Performing Arbitration on Client Reported Results and executing Cloud Script

We are evaluating the usage of PlayFab for our multiplayer game.

When our Multiplayer match is finished, each game client could call a CloudScript function with their perceived record of the game results, which could be copied into a SharedData data storage that will contain all the results.

We would want there to be some kind of game arbitration run on this data at some point after the last remaining result is uploaded (custom CloudScript), or after some delay since it's possible not all clients may report results.

It wouldn't be safe for every reporting results call to check for all data being complete, because as noted, the SharedData isn't meant to be thread safe or mutually exclusive, and because some clients may not report at all.

I thought it might be possible to use a Scheduled Task to check for matches with "complete" or "complete but timed out" results and process the results ad rewards then, but the Task running seems to only support a precision of specific 5 minute calendar clock intervals, and not something smaller. Is this still the case? I can understand that they would not want the server to constantly run heavy continuous processes but having a 5 minute window seems too long.

Do you see a better system for handling this with PlayFab? I suspect this is probably something that games roll into their Multiplayer Server to handle Arbitration and then report a single result to the server to process.

thanks

CloudScripttasks
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

You are correct - this is something that games normally use a custom game server to manage. The problem here is that Cloud Scripts are only going to be triggered by some action (I would not recommend trying to do this with a Scheduled Task). So either a) you run the actual game simulation in a dedicated server, so that it's server-side authoritative (which maximizes your ability to prevent cheating), or b) you would have a dedicated server that's designed to do nothing but check the reported results. You could have players connect to it using some unique ID from the actual gameplay session, and have the server use a timeout period to decide when to run the evaluation if all players haven't provided results.

I'd recommend also having a "trust" rating for players. So, anytime player reports for the session don't match, drop their trust level. And every time they do match, raise their trust level. Then, you can decide the outcome of session results by weighting the trusted users higher.

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.

Barry McCallum avatar image Barry McCallum commented ·

Thanks @Brendan.

We could either modify our existing 'lite' Gameplay Server to include this, or build a separate Game Session server that could be aware of player presence and arbitrate the game results.

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.