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

9. When the World Gets Bigger: Adding Scrolling

In the last chapter you learned how to add sound effects and music to Space Viking, giving Ole a heavy metal soundtrack as inspiration to beat the aliens. In this chapter you learn how to make Ole’s world even larger by adding scrolling and creating a second game level and a cut-scene. Scrolling is an easy and powerful technique that can be used to make your levels larger and to add depth to your games.

Let’s take a moment to cover the basics. Up to now the levels have been set to the dimensions of the iOS device screen. On the iPad the alien world is only 1024 × 768 pixels in size. Ole and his enemies cannot move beyond the screen to the left or right. For the background, you are using one large ...

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