A leaderboard shows a list of finite number of high scores of our game. A local leaderboard is limited to the device on which the game runs; hence, it lists only the scores achieved on that device. For such a system, we need to save the finite number of scores and compare any new score with them to decide whether to store the new score as part of the leaderboard. We may as well use Preferences
for this, but I want to demonstrate how we can read and write files in LibGDX.
LibGDX is cross-platform and has to deal with all kinds of filesystems across the different devices. On desktops, there are usually no restrictions on reading or writing files. For the web platform, file access ...
No credit card required