Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Currently, Game Center leaderboard scores can only change one-way (e.g. increase). This makes it impossible (I think) to deal with Elo ratings and the like. How are you getting around this in your leaderboards?

I have filed a bug report / feature request with Apple already FWIW.

Are you using a third-party leaderboard service? Rolling your own?

share|improve this question
    
I don't know anything about the Game Center... But did you try adding a negative score? –  Ricket Jan 27 '11 at 3:58
    
GC leaderboards only accept entries that are better than previous so this will have no effect. –  z8000 Jan 28 '11 at 4:13
    
Did you ever find a solution for this? The answer below works for storing the scores, but not for using Game Center leaderboard views or rankings, so it would be impossible to know (without completely retrieving both leaderboards) in which position (rank) a player is. Am I missing something? –  EliBud Nov 14 '12 at 22:04
add comment

1 Answer

up vote 5 down vote accepted

Off the top of my head, if negative scores are not allowed: track positive and negative scores separately.

For instance, when writing the leaderboard:

// Pseudocode
points_for_win = 3;
points_for_loss = 2;

if (didWin)
    leaderboard.positive_score += points_for_win;
else
    leaderboard.negative_score += points_for_loss;

When retrieving the leaderboard, you can then compute the user's actual score by:

actual_score = leaderboard.positive_score - leaderboard.negative_score; 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.