Book Image

Mastering Cocos2d Game Development

By : Alex Ogorek
Book Image

Mastering Cocos2d Game Development

By: Alex Ogorek

Overview of this book

Table of Contents (15 chapters)
Mastering Cocos2d Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Game Center leaderboards


We've already got a set of top 20 high scores that are stored on the user's device, so why not make a global leaderboard? In fact, even though many players don't use Game Center when they play games, it is yet another element that drives engagement. Plus (and this is the really cool part)—if you didn't know already—you can actually have players rate your game within Game Center. It's not even an extra feature or anything, as they can just tap the star count at the top of the leaderboard or achievement pane and it'll send the rating to the App Store.

Creating a leaderboard to display in our game isn't just about code, so we have to create the leaderboard in iTunes Connect first. Before we can create the app in iTunes Connect, we need to set up an App ID.

Creating the App ID

At this point, if you wish to add a leaderboard, you must sign up for an Apple developer account if you don't have one already. In Chapter 1, Refreshing Our Cocos2d Knowledge, the signup process was...