Ordering a firebase leaderboard

GDevelopers - I’ve got firebase up and running based on alex’s tutorial - by the way if you use this then watch all 5 as he changes everything in the 5th one.
My question is regarding ordering it into a top ten non locally. I had hoped/expected the query system to return scores descending based on value but ‘asc’ and ‘desc’ seems to return them based on date submitted. So what i have only gone and diddly done, is to download them, and reorder them locally. Obviously this is fine if this game (like previous ‘releases’) goes completely unnoticed . There is nothing to suggest that this game ‘harelines’ will be any different to previous efforts, and at present I’m happily retrieving the ten best score submissions that i’ve made under various aliases and i sift through them locally - but what if it’s a complete global hit? What then! What will I do?

there must be some clever way to order the scores in firebase or gdevelop or am i just not performing the right actions?
here’s that what I have done thus far:

That’s a tricky one. I’m not sure how to help you. I just watched parts of the first three videos of Alex tutorials then figured out the rest myself. There must be a way to sort variables from their number values. Just I don’t know.
This post seems a bit similar to your problem: Sorting data

1 Like

Cheers for finding that. I think it’s similar to what im doing …sifting through it and reordering it. but there must be some clever way to do it within firebase and reorder it into an array there, so you’re not having to download loads of data - i’ll research it tomorrow!

1 Like