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 5

Game Building Blocks

The game DoodleDrop in the previous chapter was written to be easy to understand if you’re new to cocos2d. If you’re a more experienced developer, though, you probably noticed that there is no separation of code; everything is in just one file. Clearly, this doesn’t scale, and if you’re going to make bigger, more exciting games than DoodleDrop, you’ll have to find a suitable way to structure your code. Otherwise, you might end up with one class driving your game’s logic. The code size can quickly grow to thousands of lines, making it hard to navigate and tempting to change anything from anywhere, very likely introducing subtle and hard-to-find bugs.

Each new project demands its own code design. In this chapter, ...

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