How to Create A Leaderboard

Hey guys,
I hope you are doing great.

I’m creating this app about Math I was wondering if someone could show me how I would code a leaderboard. I’m already using Firebase data to create the LogIn of the user but I do not know how to attach that to the leaderboard.

Hey @vfeliufto :wave: welcome!

Are you using #thunkable-cross?

I only ask because your initial post is in #classicdiscuss.

1 Like

Hi @domhnallohanlon,

Yes, I am using #thunkable-cross I’ve changed it now sorry.

Can you explain us a bit more about your leaderboard, I also have a leaderboard

I think a leader board would be great when stored like this

CLOUD listOfScores = [{(NAME:“user1”,SCORE:123},{NAME:“user2”,score:233}]

(so a list of objects)


everytime you add a new highscore, instead of just adding to a list, you compare the new object property score to the all others starting at # 1, and if it’s greater to that score insert that new object at postioin X.

when yo display the data. you display name and score next to each other in a list viewer but limit the result to the first 10 in the list