Chapter 7
Scrolling with Joy
Continuing with the beginnings of the game from the previous chapter, I now want to turn it into something resembling an actual shoot-’em-up game. The very first thing will be to make the player’s ship controllable. Acceleromater controls don’t make sense in this case; a virtual joypad would be much more appropriate. But instead of reinventing the wheel, we’ll be using a cool source code package called SneakyInput to add a virtual joypad to this cocos2d game.
Moving the player’s ship around is just one thing. We also want the background to scroll, to give the impression of moving into a certain direction. For this to happen, we’ll implement our own solution for parallax scrolling, since CCParallaxNode
is too limited ...
Get Learn cocos2D Game Development with iOS 5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.