# How to compute highscores, so that 10 matches will “correctly” compete 100 matches

When computing highscores, it is possible to:

• count sum of points (in every match),
• count average of points (across all matches).

Sum is vulnerable to: multiple low-quality matches.

Average is vulnerable to: creating new account and playing few high-quality matches.

How to face this problem? Multiply sum x average? How is this done in practice, e.g. in World of tanks?

-

Is this a PvP game? If so you should look at ELO ratings: http://en.wikipedia.org/wiki/Elo_rating_system

There is a pretty basic idea behind it. Each game changes your rating, this change is solely based on your rating and the opponents rating and wheter you have won or lost.

• If you face a opponent stronger or equal to yourself: many points gained from winning, few points lost from losing
• If you face a opponent weaker than yourself: few points gained from winning, many points lost from losing

This system is regulating itself as winning against the same enemy again and again will only inflate the gain from it and if you have a high rating but lose against someone with a lot smaller rating you lose alot again.

-
Very interesting, thanks for explanation! I was omitting the ELO description because it sounded hard and my game is 1-4 players. I think, that some of the ideas can be used in my game anyway! Maybe 3-4 players game will be for fun, 1-2 – for the ranks. Or, e.g. for 4 player game: divide players into pairs (first, second), (second, third), (third, fourth) and compute the points like you described. – GoCoder Jul 26 '12 at 20:41

If it's a free to play game, I'm not sure how you can protect against someone creating a new account. But integrating highscores with social networks may discourage people from creating multiple accounts as it would be linked to their profile. While also making the highscore more meaningful to be competitive against friends.

The highscore should be the highest score from a single match. If you want to have a running total or average they should be ranked separately. Likely the average should be further divided by number of games played so it's clear that the people with the most games played and the highest average are truly superior players.

Also highscore boards can be a daily highscore (for that day or the previous day) and all-time highscore.

-
I am using GameCenter so the social aspect will be provided. Do you maybe know if GameCenter somehow encrypts data exchange? If not, one could create false packet with a false highscore – GoCoder Jul 26 '12 at 17:10
I think you may be worrying too much about it. If someone is willing to go to those lengths to get a false highscore, they're going to get it. You should worry more about making an enjoyable game that people want to play. Most of the people won't be playing to get the highest score. They'll play because the game is fun. – Byte56 Jul 26 '12 at 17:22
I want to take care of the security to some degree. The fun or playability of the game is indeed important. – GoCoder Jul 26 '12 at 18:22
Of course you can take care of it to some degree. Just don't worry about is so much. I think worrying about encrypting the score data is too much right now. Focus on finishing the game first. – Byte56 Jul 26 '12 at 18:25
@GoCoder I agree with Byte56. Focus on the game first. But FYI: GameCenter scores aren't encrypted and quite easy to hack. I don't know if Apple has any plans to change the game-center security anytime soon (haven't looked into iOS 6 yet). – bummzack Jul 26 '12 at 21:45

Player rank is more a metric of how well or poorly the player performed against their competitors rather than a sum or average of the points scored in a game.

To develop algorithms to create player rankings google Microsoft Truskill or Elo ratings, both will give you ample ways to determine how to generate player rankings and create a leaderboard.

Chuck

-