Austin Brunkhorst Austin Brunkhorst - 1 year ago 51
Javascript Question

Prevent Cheating on Javascript Game

I'm currently developing a game using JavaScript/JQuery. It's a simple brick breaker type of game keeping score, levels etc. I'm planning on implementing a leader board that users can submit their final score to. The only problem I see with this is users manipulating the score using developer tools on most browsers. I understand that keeping things server side will resolve most of these issues, however if there is a high volume of users, it will hit my server hard with requests. Cookies - Easily changed client side. I'm honestly out of logical ideas to promote fair game play because there is ALWAYS people who seek to cheat/become top of the leader board. With that said, what's an efficient and effective way to keep track of the user's score without giving them access to changing it?

Answer Source

obfuscate their score by creating an equation that can only be calcuated on the server side.

Edit: RobG is correct in that it will need to be calculated on the client side.

I hacked the Angry Birds game when it launched on chrome:

However, they have since obfuscate the code so much that its impossible to figure out which function calculated hash..

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download