Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+2)

So basically I just serialize name, score etc to a JSON and send it to server side (PHP script) which parses/validates it and dumps it to a MySQL database. And then there is another PHP script which is used to query the same data for display then.

The game side is available in my GitHub repo (C#/Unity). The server side isn't but it very basic PHP+MySQL stuff that is like the first thing covered in any tutorial. 😅
https://github.com/anttihaavikko/typefarmer/tree/main/Assets/Leaderboards

(1 edit)

Thank you for sharing your techniques and codes, I'll study it later :)
I also noticed that your leaderboard has the flags UI, how do you make that feature? Something like: checking a table to the player's IPs and find out his country? Really appreciate your sharing!

Yeah the server side checks the IP geolocation and and uses that. Then there is a single texture with all the flags and FlagManager.cs in that same link finds the coordinates to show for any given locale.

Cool! I'll make my implementation of that feature. Thank you :)