Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fake scores in Google Play Game Services

Some of the scoreboards have been receiving fake score submissions. Here is an example:

Top three scores seem fake

The same thing happened to a game I've made. Is there a way to protect one self from fake submissions and is there a way of moderating the scoreboards?

like image 576
Smotko Avatar asked Aug 20 '13 07:08

Smotko


People also ask

What is Google leaderboard?

At the end of a game (or at an appropriate moment that you've determined), the game submits the player's score to one or more leaderboards you've created for the game. The Google Play games services checks if this score is better than the player's current leaderboard entry for the daily, weekly, or all-time score.

Does Google play games pay?

Earn rewards as you playWith Google Play Points, you'll earn points on everything you buy with Google Play Games, including in-app items and subscriptions. You can rack up and redeem Play Points on your PC through the same process you use on your mobile device.


1 Answers

The most simple (and popular?) way users fake high scores is by using root access to edit saved data.

Few simple steps you can take in order to make it harder:

  1. Don't hold the score as is in the memory or on saved state. For example multiple/divide by a factor & add a constant. Even better option is to implement an encrypted shared preference.
  2. Add a check-sum to the structure holding the score (CRC32, MD5).
  3. Validate the score to check no one played with it when loading from saved state or reading/writing in the memory.
  4. Use ProGaurd to obfuscate your code. If you're making money use DexGuard which is much stronger and will also make software piracy harder.
like image 126
sagis Avatar answered Sep 23 '22 23:09

sagis