# Adding a new highscore before or after an equal score?

I'm making a highscores list for my 2048 replica. An entry in the list consists of a name and a score (e.g. "John" and 2100.) When I add a new entry, the code runs through the list and inserts the new entry when the score for the new entry is greater than the currently indexed entry. So imagine this list:

Roman   17000
Sergei  12500
Dean    8000
Andrew  1400


If John was inserted into the list, the new list would look like:

Roman   17000
Sergei  12500
Dean    8000
John    2100
Andrew  1400


The question is, what do I do when inserting the entry for "Steve" whose score is 8000. Does he go before or after Dean? Is there a convention for this?

• Normally the score of the new player (Steve) would go on a higher place, as it is inserted afterwards – Ion Farima Apr 5 '14 at 17:32
• Really? Friends have told me that normally the new entry would go afterwards. I mean, I understand that it's ultimately a style choice, but I'm curious if you know of any examples of major games where new and equal highscores are given a higher place? – Lou Apr 6 '14 at 9:49

Though it is (to my knowledge) most common for newest score to be entered at the top, I would argue that the OLDEST score would deserve the first position.

For this simple reason:

The first player to achieve the high score had LESS TIME to achieve that score, than people making later/following attempts, thus deserving a higher position as (s)he was the quickest to achieve the level of skill required to make that score.

Inspired by this you might track time spent in each game, and sort the list so that LEAST time spent on creating a similar score goes FIRST.

• Good idea :). I might well do that if I'm bored and want to add more features. – Lou Apr 8 '14 at 9:33
• Then again, prioritising by time only works if you're measuring time. As it is, whether someone achieved a score of 8000 on the 1st of April compared to the person who achieved a score of 8000 on the 8th of April doesn't make any difference. – Lou Apr 8 '14 at 9:37

Just sort them alphabetically.

And if you have numbers to call out the position, be sure to handle the tie case appropriately so you aren't calling one person 3rd and another 4th even though it's the same position.

• This answer has a two perfectly egalitarian methods that no one else has mentioned. Though Loeffe and Riccardo's time idea is pretty good, too. – Seth Battin Apr 7 '14 at 23:07
• Yeah, it's a good idea. I don't think I'll do this though, simply because it's easier to prioritise entirely by score, and I don't want to make a complex hiscores list. As I've said before, this is only for me :). – Lou Apr 8 '14 at 9:35

If you're looking to encourage competition and activity, it might make more sense to have the more recent score replace the older one. Players wouldn't be able to simply achieve a high score and become complacent, because their score is at risk of being replaced at any point.

In fact, if you really wanted players to rue being replaced, you could have the higher scores on the list displayed in a style that is more rewarding than the older ones (e.g. more colorful, stylized, etc.) This way when a player's score is tied, not only do they move down, but they also lose whatever superficial qualities were associated with that spot on the list.

• Fair point, but I'm only building a 2048 clone that I can play on my machine - I mainly want it so I can keep track of my own score, and if any of my friends play it. – Lou Apr 5 '14 at 18:26

Tradition says new scores on top. No idea why, though... now that I think about it, it makes more sense the other way around, you should award a player for achieving an equal score in less time. But that's just my personal opinion, in the end the choiche is up to you :)

• Okay :). I was curious if there was a standard. Personally I agree that putting it after makes sense - but only because it encourages you to beat the score, not match it. – Lou Apr 5 '14 at 19:48

I don't believe there is a standard. From what I've seen, and what I use, who ever got to the top first should keep their position.

Now the choice is up to you, but I would spend some time to add more to the highscore board so it can track different achievements of a player throughout the play-time, and then compare them to the player who has equal score.

Placing Steve on top would be unfair for Dean. Placing Steve below Dean will make Steve angry. One of many things that might lead to a forum war. It's a minor but you got my point.

• Fair point, but I probably won't refine this significantly. As I commented on Clockwise's post, I'm only making an application I can play on my computer, and possibly get a friend to play. Also, it's only 2048, I can't think of any achievements that could further weight the highscores. – Lou Apr 6 '14 at 9:48