O'Reilly logo

LibGDX Game Development Essentials by Juwal Bose

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing a local leaderboard

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.

Filesystems and access permissions

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required