Skip to main content

Game Building Blocks

  • Chapter
Learn cocos2D 2
  • 417 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 39.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics