O'Reilly logo

Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk by Ray Wenderlich, Rod Strougo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

15. Achievements and Leaderboards with Game Center

Space Viking is quickly becoming a pretty cool game. It uses a lot of different aspects of Cocos2D, including actions, animation, scrolling, sound, and game physics. It has multiple levels with different styles and has a kick-butt main character.

But when you make a game like this, you want to keep your players coming back for more. One good way to do that is by adding achievements and leaderboards into your game using Apple’s new social gaming network: Game Center.

In this chapter, you add achievements into Space Viking for completing each level to give players a sense of accomplishment and drive them to complete the game. You also add leaderboards for the Escape level, so players can compete ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required