Game and present the winners

Dear All
I create a game for a clients..it is about questions...but my client asked for 2 things

  1. Let the player put his name
  2. To count the time for everyone so we can show the best five.. depend on the solution time
    So could we do something like this here

Ultimately if you want to keep track of scores, you will need server-side components. There are many different ways to go about developing a server-side application depending on your existing knowledge, constraints, and budget. So there's not really any "one size fits all" advice. Generally I'd say the easiest and most common route would be to make a basic PHP page that can take and store scores (likely in a MySQL database) and then another page that reads these out and returns a list of the top ones. You'd then need some javascript code in Hype to set/get via this page using an XMLHTTPRequest/fetch. I'd bet that ChatGPT 4 could generate this code pretty reliably, but whether it is easy to get running/deployed may depend on your server.

I know others have done such projects - I don't think I see a turnkey solution, but if you search for "leaderboard" in these forums you might get some more info and context.

1 Like