Leaderboard in website and calling JavaScript (SOLVED)

My game currently is embedded in my website and yesterday I was trying to make a leaderboard in the website by using a save file with sys.save/load. That didn’t work and I have a few other ideas but I don’t want to spend a ton of time learning something and working on something that is useless to me. Any ideas on how I could do this?

I’ll be doing the same thing for my game. I plan on using a php/mysql solution and have the game send a formatted url post to a php page that will post the result.

This is assuming defold has that capability of course…very very new to defold but liking it more and more.

Yes you can make http calls to a server to report scores.

You can call a JavaScript function using html5.run() to update high scores.

1 Like

One option is PlayFab, which supports leaderboards and much more. Defold has full support for PlayFab.

Thanks for the suggestions. I have gone with the html5.run one and it has been going good enough. Ran into an error on the website of “Unable to preventDefault inside passive event listener due to target being treated as passive” but I can find a solution on the internet to this tomorrow.

1 Like