question

Muhammad Roshaan Tariq avatar image
Muhammad Roshaan Tariq asked

How to check game play values in cloudscript

Hi, I have a gameplay in which I award my players the loot if they win the level/game. What I wanna do is that I want the playfab to check if the players had really won the game and not hacking or cheating the game code to get the loot.

How can I achieve that using Playfab's cloudscript?

CloudScriptPlayer Inventory
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

What you need to check and how often is going to be game-dependent. I would suggest starting with this post, as it discusses this in depth:

https://community.playfab.com/questions/12831/methods-to-reduce-the-likelihood-of-cheating.html

If you have a strictly turn-based game, you can use Cloud Script to update Entity data that is the state of the game and check for cheating in that script. For other games, you should consider using a hosted game server if you need to have good security against cheating behaviors.

4 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.

Muhammad Roshaan Tariq avatar image Muhammad Roshaan Tariq commented ·

@Brendan Can you please also provide some directions for "hosted game server"? What is it and how will it help in my problem/task?

0 Likes 0 ·
brendan avatar image brendan Muhammad Roshaan Tariq commented ·

Yes, I'm referring to server logic that you write, which controls the game logic so that it's as secure as possible, and which is hosted either with us or elsewhere. Here's the section of our docs that talks about custom game server hosting: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/

0 Likes 0 ·
Muhammad Roshaan Tariq avatar image Muhammad Roshaan Tariq Muhammad Roshaan Tariq commented ·

@Brendan With what you have shared looks like it is for multiplayer games. But my game is not really a multiplayer

0 Likes 0 ·
brendan avatar image brendan Muhammad Roshaan Tariq commented ·

Using a custom game server to host state information for players isn't only for multiplayer games. For games that would otherwise need a high frequency of Cloud Script usage, it may be a more affordable option.

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.