1

I see an interesting score number from the leader board of one of my apps: 2,147,483,647. This number happens to be 2^23 -1 and it's one of known double Mersenne primes. Here is the code how I calculate game score:

float highestScore = 10000;
float factor1 = powf(0.90, (colNumber == 7 ? 0 : 1));
float factor2 = powf(0.90, (rowNumber == 8 ? 0 : 1));
float factor3 = powf(0.9, (size - 2));
float factor4 = rotationOn ? 1 : 0.33;
float factor5 = powf(0.8, hintCount);
float factor6 = pow(0.95, ((int)(tick / 30)));
float factor7 = pow(0.90, letterNum);

theScore = (int) (highestScore * factor1 * factor2 * factor3 * factor4 * factor5 * factor6 * factor7);

//sometime later but before reporting game score to leader board
int64_t score64t = (int64_t)theScore;

I don't know why a big number score is reported (actually two cases of this big number score), but I wonder if this relates to jailbreak devices. How can I remove this score from the leaderboard?

jscs
  • 63,694
  • 13
  • 151
  • 195
Tony Xu
  • 3,031
  • 4
  • 32
  • 43
  • 1
    2,147,483,647 is the maximum of 32-bit signed integer. – Raptor Nov 25 '13 at 06:22
  • 1
    [Developers can now delete fake scores from Game Center leaderboards](http://www.macrumors.com/2013/10/29/developers-can-now-delete-fake-scores-from-game-center-leaderboards/) – jscs Nov 25 '13 at 06:25
  • 1
    See this also: http://stackoverflow.com/a/5531421/188331 – Raptor Nov 25 '13 at 06:26
  • @ShivanRaptor, the step of (int64_t) in my code causes the problem? Not quite sure your suggestion. – Tony Xu Nov 25 '13 at 06:32
  • Implies that the hacker's mechanism is limited to 32-bit :) – Raptor Nov 25 '13 at 06:44
  • 1
    What is the "Score Range" of your Leaderboard in Game Center? See Table 14-2 in the [documentation](https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/15_GameCenter/GameCenter.html#//apple_ref/doc/uid/TP40011225-CH7). – Raptor Nov 25 '13 at 06:46
  • @ShivanRaptor, turns out I did not set up score range in Game Center. Just added, need wait to see. Thanks. So it's from jailbreak devices, most likely. – Tony Xu Nov 25 '13 at 07:27

1 Answers1

1

Jailbroken devices can cheat game center. There is an app for jailbroken devices that let the user choose the score that is sent. It is a problem that happen with all games. In game center configurations you can set the maximum possible score to mitigate this problem, but cheaters will still be able to score that value, even if they didn't really did that score.

You can block scores by going to iTunnes Connect -> Manager Your Apps -> select the app you -> Manage Game Center -> Manage Score and Players -> Click Manage in the Manage Top Scores column

fbafelipe
  • 4,862
  • 2
  • 25
  • 40