Add a Leaderboard

What better way to motivate your players than with leaderboards. With leaderboards, players can see how their scores compare with other players around the world. In a game like Hog Dice, you may have leaderboards that rank players based on how many rolls it took to win the game or who has the most wins.

Each app can have up to 500 leaderboards. You can make leaderboards recurring, which means they reset after a set amount of time; or you can set up classic leaderboards that never expire; you can also mix and match. The types of leaderboards you create depends mostly on your game and its players.

For this example, you’ll set up a single “Most Wins” leaderboard that shows the players’ rankings from highest (most wins) to lowest (least wins) scores.

To add a new leaderboard, click the + button immediately to the right of the text that reads Leaderboards (0). After that, you’ll be prompted to select the type of leaderboard you want to add:

images/AddingLeaderboardsAndAchievements/add-classic-leaderboard.png

Select Classic Leaderboard by clicking the Choose button, which takes you to the Add Leaderboard page, where you can set up the following options:

images/AddingLeaderboardsAndAchievements/leaderboard-setup.png

For more information on each of these settings, click the small question mark icon to the right of each option. Note that you’ll need to modify the Leaderboard ID to match the Bundle ID you set up earlier. For example, {your bundle id}.wins.

The next step is to add the leaderboard’s localization options to allow your game to reach a broader worldwide audience. You’re welcome to set up more than one language; however, for Hog Dice, you’ll set up only one: English.

Click the Add Language button to open the Add Language page. Set the language options, like so:

images/AddingLeaderboardsAndAchievements/add-language-leaderboard.png

To add the leaderboard image, click Choose File and navigate to the resources folder for this chapter. Inside, you’ll see two files; the one you want now is the most_wins.png file.

Once you have everything set up, click Save. You’ll end up with something like this:

images/AddingLeaderboardsAndAchievements/add-language-leaderboard-saved.png

Click the Save button on the leaderboard setup screen to save the leaderboard and its options.

The next step is to add an achievement.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.85.183