Leaderboard subscores update behaviour

Hello,

Score and subscore update independently of each other. In a leaderboard set to Best and Descending:

  • I create a first leaderboard entry with {score: 1, subscore: 10}
  • then a second write is done with {score: 2, subscore: 4}
  • The storage object has the values {score: 2, subscore: 10}

It appears that subscore will only update if the new value is larger than the previous one, which makes no sense - the combination of score and subscore should be taken into account together to determine whether a score is “better” than another one. And the whole record should then be updated, along with the metadata.

Say the score represents the number of enemies killed and the subscore is the number of headshots. In game A, the player does 10 kills and 3 headshots. In game B, the player kills more enemy but has fewer headshots (12 kills, 1 headshot). It is a better score than is previous one - so I want the record to reflect the best results: 12 kills, 1 headshot. With my testing it would give me 10 kills, 3 headshots which is not the result of any games played.

Am I missing something?

I think you maybe right on some aspect of this, I’ll let @zyro chime in and see if there is something more to this. Thank you!

I ended up doing a custom check against the existing leaderboard record and using Operator.Set instead of Best. It works well enough at the cost of an additional database check. However, for planning purpose it would be good to know whether this is by-design or to be considered a bug.