Top 5 Leaderboard?

Hey, guys my app is mostly finished last thing I'd like to add is a Leaderboard that displays top 5 scores and players.
The process would go: open the app>put your name in>play the game until you lose> open the scoreboard screen/horizontal arrangement and the top 5players+scores are there then you can press restart, put the name in again and repeat the process

Is there any simple way of doing this with tinywebdb/clouddb so the scoreboard shows on any phone it gets opened on

help is appreciated



this is how it looks for now

Please search the community for leaderboard, scoreboard, high score or other similar terms. There is much to read about this on the community.

Also the FAQ

Well i have but only solution after 2 hours of browsing i saw is ABGs daily updated leaderboard which is very confusing

In which database you are storing the values /points?

tinywebdb but honestly any of them work id like it to show on any device the app is opened on

And how are you storing your usernames and scores, in what format/layout (list/json/text etc) ?

image
text (player 1, player 2 player3...5)

Now show how that data comes back to you, and what it looks like, when you call it from your database.....

1 Like

Meanwhile, have you read/search this guide related to leaderboard from tinywebdb earlier given by @ABG

Source link

If you have all your users and scores in a list, you can do this, using @KevinKun 's ListUtil extension:

well thats the only thing that ive found that sort of fits my goal for the app but i still dont know how to go about it i have created the screen but the blocks part is confusing me, how to update it how to put the scores into the leaderboard the whole process isnt clear to me

ICARUSKOPIJASCORE (3).aia (3.5 MB)

i have tried like this and see the result

The logic is, you must have the list of participants - This is method 1
(i hope you need firebase to store the participants list , after getting the list try this method)
Check in screen2
ICARUSKOPIJASCORE_11.aia (3.5 MB)

For your case it will be best to use gsheet.

  1. You can send users name and score using form response method to gsheet
  2. Whenever screen initi or after winning or losing the game use gviz method to limit data in ascending order to first 5 , your total problem will be go off.

https://docs.google.com/spreadsheets/d/YourSheetID/gviz/tq?sheet=YourSheetName&tq=select * ORDER BY B ASC LIMIT 10

where col A is username and col B is points

1 Like

..... the App should store the name for this purpose to help avoid typographical errors by the player?