rootsnwonky avatar image
rootsnwonky asked

What is the normal time frequency of accessing cloud scripts during the height of the game?

If I use local variables and check their norm only at the end of the round using cloud script, some states may turn out to be a fraud on the part of players during the round.

1. I have a cloud script with statistics names, who receive and check several data every 20 sec. It's ok, or need more time span?

2. Think about sending data of state player speed, damage, etc., in Dictionary format to periodic check this Dictionary for changes. A stable way to avoid cheaters?

3. It's not correct to send frag data to Cloud Script after each kill, right?

Thanks in advance!

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

The legacy JavaScript-based Cloud Script system is not designed for high frequency use per player. You could, technically, use our Azure Functions Cloud Script system that way, but if you're calling more than a few times a minute, it would likely be more cost-effective to use hosted games servers. Specific answers to your questions would be:

1. Three times a minute would be fine, as long as you're not dependent on any third-party API calls (using http.request). Those can be an issue if the other service is delayed in responding. In general that's a problem, as it can cause your title to have too many servers "locked up" waiting on those responses. In that case, additional calls to run scripts could be rejected due to too high of a concurrency level in Cloud Script (this is in the legacy system only - Azure Functions does not have this limitation). However, why do you need to call at that rate? In general, it's just as easy to check for cheating with data from larger timespans - in fact, in many cases it's easier, since it also allows you to evaluate randomization on the client more effectively.

2. That really depends on the specifics of your game. I take it this is an action game of some kind? If so, what data is sent between clients? Are you sending positional info (so, I could just modify my renderer to see through walls)? Since you mentioned frags in the next question, is it a shooter? Who is authoritative if you see me in your reticule and shoot, but on my machine I've already rounded a corner? And what prevents me from having my client claim whichever of those I can influence? If you're checking position and speed, how are you checking that I didn't just pass through a wall? As you can imagine, these questions could keep going for quite a while. Basically, consider everything you're letting the client be authoritative about as a potential source of cheating, and that every piece of data you send to the client could be immediately visible to the player.

3. Definitely not, unless frags are extremely rare (say, 3-4 per minute).

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.

rootsnwonky avatar image rootsnwonky commented ·

Thanks! It's a fast shooter for mobiles with an orthogonal view. I use Photon Network for players' dynamic links. As far as I know, Photon uses http to send data. It is possible to use Photon Interface for quick data transfer to PlayFab Cloud scripts?

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.