GameOn Tutorial - Wrap Up
And there you have it, a leaderboard using GameOn's APIs in a simple quiz game. The source code will need the following changes before you can run it:
- Update the
TOURNAMENT_IDvariables with valid ids from your game.
- Generating the GameOn API with the openapi-codegen tool.
As a next step, you could explore how to add prizes to the game. One approach is to create in-game "trophies" for competition wins. You could check to see if the current player is at the top of the leaderboard in the leaderboard activity. If so, after the tournament closes, the winning player can call Claim Prize. Once the prize is awarded, you could add a trophy icon to the splash screen.
We hope that this tutorial has helped your understanding of how to integrate GameOn into your own Android game. All source code for the app is available to download. Please let us know what you think!