nakama icon indicating copy to clipboard operation
nakama copied to clipboard

Leaderboard subscore to use a different sort than score

Open adbourdages opened this issue 3 years ago • 1 comments

It would be awfully nice to be able to set a leaderboard to be sorted by Descending on the score value and Ascending on the subscore value.

This would represent the use-case where a higher score is better but a smaller time (subscore) is also better (as a tie-breaker). Or in other words: get the highest score possible in the least amount of time.

Unless there is a better suggestion, it looks like I'll have to "encode" the subscore (subscore = - time_taken) in order for the rankings to be correctly calculated.

adbourdages avatar Jan 20 '22 17:01 adbourdages

I'd like to add to this that it would also be nice to be able to set different Operators for score and subscore.

The use case would be setting the score with INCREMENTAL and the subscore with SET. Score is incremented, whereas subscore is set to the current timestamp, in order to break ties in favor of whomever posted the score first.

gpiumatti avatar Mar 04 '22 10:03 gpiumatti