Abstract
The game DoodleDrop in Chapter 4 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’s no separation of code—everything is in just one file. Clearly, that 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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 Steffen Itterheim and Andreas Löw
About this chapter
Cite this chapter
Itterheim, S., Löw, A. (2012). Game Building Blocks. In: Learn cocos2D 2. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4417-2_5
Download citation
DOI: https://doi.org/10.1007/978-1-4302-4417-2_5
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-4416-5
Online ISBN: 978-1-4302-4417-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)