question

dbubalo1987 avatar image
dbubalo1987 asked

General Quetion to Cloud Scripts / Anti Hack

Hey Guys, it's me again :)

I've looked up through numerous videos for implementing into my game. My Game-Mechanics are done already since I'm developing now for one year. I have used photon for all of this and to be honest i think I'm starting with my serverbackend very late. But since I started programming at all one year ago i didn't have time to figure out everything.

Then I found some videos for player-statistics with Enable API Features, which isn't very good for Anti-Hack since the client, if he hacked my code, could be able to change the values how he wants. Then I found some videos over Cloud-Scripts.

My Game is a fast-paced BattleRoyale Shooter (2D) and I was wondering for what I should use cloud scripts. Of course for logging in and handling the user's level, overall statistics and so on. But what about tracking kills while the player is playing a game? Wouldn't this cost too much traffic? Let's say (ya I know I'm dreaming) I'm having 5000 Players playing in rooms -> Wouldn't it be too much traffic if I track everytime a player kills another one? I mean this would be pretty perfect, but I don't know If I'm overusing my Free Tier with this. Or is it pretty normal to do it like that?

Thanks for your answers. Dario.

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

Please have a look at this thread, as it covers this exact topic (frequency of calls):

https://community.playfab.com/questions/27916/what-is-the-limit-of-calls-per-second-to-the-api-e.html?childToView=27952#comment-27952

In short, for a game that needs to frequently update authoritative data, you will need to use a custom game server, or some other in-memory store that you can read from and update at a high frequency. At the end of the game session (or periodically, if it's going to be more than a few minutes), you would update the PlayFab-stored data with the new information.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dbubalo1987 avatar image dbubalo1987 commented ·

Okay, so checking every kill or health would be overpowered. But okay as the guy in the other thread said I can make my shop just normal, don‘t need code for that. The thing that matters for me first is that purchases cannot be cheaten, so maybe is it a good idea to it like this (?): User buys a skin -> skin is in his purchased-item list. Since my player-prefab has every skin on it someone who‘s cheating could free all skins on his local client and when the user presses play i am checking if the things he equipped are purchased via cloud code. This will not send so much traffic i think.

0 Likes 0 ·
brendan avatar image brendan dbubalo1987 commented ·

Again, it really depends upon the specifics. If the things being purchased are normal skins, etc. for games, players aren't going to be purchasing them at a high rate. Maybe a few per session. That should always be done via our secure API calls (receipt validation, entitlement checks, PurchaseItem, etc.). At the other extreme, you have clickers where players are purchasing things like lemonade stands as fast as they can click. That would be an example of a "purchase" which you should aggregate information about over time.

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.