amasad (3449)

You can use this to create and persist a scoreboard for your game.

It's very simple:

  1. include a script in your app <script src=""></script>

  2. You'll get a global object scoreboard

  3. scoreboard.submit\({username: 'playerNameHere', score: numberScoreHere}\)

  4. List the scoreboard using scoreboard.list\(\).then\(topTenScores => console.log\(topTenScores\)\)

The script is smart enough to create a board for your game (it's domain-based) so it's very easy to use. End to end example here:

Here is the source code for the service if anyone is interested 😉

You are viewing a single comment. View All
JSer (84)

People can hack the scoreboard using the Developer tools (Ctrl + Shift + i) and type scoreboard.submit\({username: 'Their Names', score: 10000000000}\) in the console 😂😂😂
(You can see that I hacked into your scoreboard demo)

Calamari1 (95)

@iamcaleblol: Really securing a leaderboard is pretty hard, if you have both front and back totally open source (inclusive the secrets)

amasad (3449)

@iamcaleblol: lol yes, not sure how we can secure it though. You can do that with Firebase or any other clientside data API. Open to ideas.