Summary

We have added Google Play services to YASS, including setting up the game in the developer console and adding the required libraries to the project.

Then, we defined a set of achievements and added the code to unlock them. We have used normal, incremental, and hidden achievement types to showcase the different options available.

We have also configured a leaderboard and submitted the scores, both when the game is finished and when it is exited via the pause dialog.

Finally, we have added links to the native UI for leaderboards and achievements to the main menu.

We have also introduced the concepts of events, quests, and gifts and the features of saved games and multiplayer that Google Play Game services offers.

The game is ready to publish ...

Get Android Game Programming: A Developer’s Guide 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.