I've planned to make a leaderboard module for MoModth, but I went a step further with my plans and I'm thinking about to make a universal tool for it.
I know there are Google Play etc. leaderboards that you can use but this is platform specific. When you want to make your own leaderboard dedicated for your game and platform independent then currently you have to make it on your own server right? I mean create (for instance) MySQL database and write a PHP code to cover your API. It's pretty much of work as for one simple feature.
What I'm thinking about is to make a tool where you would set up your leaderboard on the web page app (something like in Scirra Arcade). I mean here the name of the leaderboard, fields (score, player name etc.), should it be sorted ASC or DESC etc.
Once you set up everything, you recieve very easy API to use it in your app.
This one will save score to the system.
This one will return a C2 JSON dictionary data with your current top scores
Of course this is only some trivial example, but you know what I mean. So the simple steps which you would have to do in order to have your leaderboard working would be:
1. Set you leaderboard on the site
2. Add one event using AJAX object to save score
3. Add one even using AJAX and Dictionary to load leaderboard
Then just generate output in your game with Text Object or Sprite Fonts. That's it. But this can be also covered by some C2 code snippet.
I will do it for myself anyway in the simple form. But if you also find it useful then I'll create a whole site with admin panel etc. so you could use it easily as well.
Just let me know what you think.