Sign In Register

How can we help you today?

Start a new topic

Leaderboard identical scores

Hey!


Hoping this is a quick & easy one!


We have 2 leader boards in our current project that are working great.


The first leader board is level partitioned & sorted by max score.


The second leader board is for a different game mode and uses a weighted value to rank players based on progress. Example: level * score * someAdditionalWeightedInformation.


Current scenario for either of these leader boards:

Player A scores 1000 on level 1. Player A is ranked #1.

Later that day, Player B also scores 1000 on level 1.  Player B is ranked #2.


What I am looking to achieve:

Player A scores 1000 on level 1. Player A is ranked #1.

Later that day, Player B also scores 1000 on level 1.  Player B is ranked #1.

Player A is now ranked #2.


How are we able to set the latest score to rank/insert above matching values instead of below? (I am hoping to avoid having to use multiple partitions & manually calculating date/time formats on the players side).


Thanks for taking the time to check this question out!





Hi Jeremy,


If you add a timestamp attribute to your scores you can use that to sort them so the most recent will always go on top. You can do that by configuring your event like this. The ${now} default value for the time attribute will automatically populate it with the timestamp the score was posted at.



Next you can set up your leaderboard like below.



After this I logged is as 3 players and posted identical scores as p1, p2 and then p3 in that order. As you can see from the results below they are sorted by most recent.



Is that what you require ? If you have any further questions just let me know.


Thanks,

Liam

Hi Liam,


A big thank you!  Works a treat.  You get my vote for the weekly piece of office cheesecake award!


Thanks,

Jez



Login to post a comment