Skip to Main Content
Learn cocos2D Game Development with iOS 5
book

Learn cocos2D Game Development with iOS 5

by Steffen Itterheim, Andreas Löw
November 2011
Beginner content levelBeginner
532 pages
15h
English
Apress
Content preview from Learn cocos2D Game Development with iOS 5

Chapter 8

Shoot 'emUp

What does a game of this kind need above all else? Something to shoot up and bullets to evade. In this chapter, you'll be adding enemies to the game and even a boss monster.

Both enemies and player will use the new BulletCache class to shoot a variety of bullets from the same pool. The cache class reuses inactive bullets to avoid constantly allocating and releasing bullets from memory. Likewise, enemies will use their own EnemyCache class because they, too, will appear in greater numbers on the screen.

Obviously the player will be able to shoot these enemies. I will also introduce the concept of component-based programming, which allows you to extend the game's actors in a modular way. Besides shooting and moving components, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk

Learning Cocos2D: A Hands-On Guide to Building iOS Games with Cocos2D, Box2D, and Chipmunk

Rod Strougo, Ray Wenderlich

Publisher Resources

ISBN: 9781430238133Purchase book