Adding leaderboards and achievements

So we know why leaderboards and achievements are a good thing. The first thing we need to do here is plan our achievements. A leaderboard is a high score table, and that's it! There isn't a great deal of things we can do to make them different. The achievements, however, deserve some discussion.

Planning the Snake achievements

At first, it might seem that a really simple implementation of a really simple game, like our Snake game, isn't deep enough to have many, or even any, achievements. So what follows is a quick brainstorming session of achievement ideas:

  • Score 10, 25, 50, 100, and so on: Simply unlock achievements at different levels of high score.
  • Snake length: Simply unlock achievements at different snake ...

Get Learning Java by Building Android Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.