Apress

Learn cocos2d Game Development with iOS 5

By Steffen Itterheim , Andreas Lw

Learn cocos2d Game Development with iOS 5 Cover Image

Learn cocos2d Game Development with iOS 5 provides a rock-solid—and expanded—introduction to the cocos2d iOS game apps creation engine and related tools, including the new Kobold2D project and more.

Full Description

  • ISBN13: 978-1-4302-3813-3
  • 532 Pages
  • User Level: Beginner to Intermediate
  • Publication Date: November 8, 2011
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $39.99
  • eBook Price: $27.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

Create compelling 2D games with Learn cocos2d Game Development with iOS 5. This book shows you how to use the powerful cocos2d game engine to develop games for iPhone and iPad with tilemaps, virtual joypads, Game Center, and more.

It teaches you:

  • The process and best practices of mobile game development, including sprite batching, texture atlases, parallax scrolling, touch and accelerometer input.
  • How to enhance your games using the Box2D and Chipmunk physics engines and other cocos2d-related tools and libraries.
  • How to add UIKit views to cocos2d and how to add cocos2d to UIKit apps.
  • The ins and outs of the Kobold2D development environment for cocos2d and its preconfigured libraries, including cocos3d and Lua.

Best of all, Learn cocos2d Game Development with iOS 5 will have you making games right from the very start. It guides you step-by-step through the creation of sample games. These fun examples are modeled after popular App Store games and teach you key concepts of the cocos2d game engine and relevant tools like TexturePacker (texture atlas), PhysicsEditor (physics collision shapes), Particle Designer (particle effects), Glyph Designer (bitmap fonts), and others.

This book offers a rock-solid introduction to creating games made entirely with cocos2d and little or no iOS 5 SDK and OpenGL code. It also details alternative implementations, identifies the best free and commercial tools for cocos2d game development, features coverage of the author’s improved cocos2d game engine (Kobold2D), and even helps you enhance your game’s marketability on the App Store.

What you’ll learn

  • The process and best practices of mobile game development, including sprite batching, texture atlases, parallax scrolling, touch and accelerometer input.
  • How to enhance your games using the Box2D and Chipmunk physics engines and other cocos2d-related tools and libraries.
  • How to add UIKit views to cocos2d and how to add cocos2d to UIKit apps.
  • The ins and outs of the Kobold2D development environment for cocos2d and its preconfigured libraries, including cocos3d and Lua.

Who this book is for

The book is aimed at beginning game developers looking for an easier and even more powerful way to create compelling 2D graphics using OpenGL and Objective-C. It is assumed that the reader will have some knowledge of object-oriented programming and the Apple and iPhone/iPad developer environment.

Table of Contents

Table of Contents

  1. Introduction
  2. Getting Started
  3. Essentials
  4. Your First Game
  5. Game Building Blocks
  6. Sprites In-Depth
  7. Scrolling with Joy
  8. Shoot ’em Up
  9. Particle Effects
  10. Working with Tilemaps
  11. Isometric Tilemaps
  12. Physics Engines
  13. Pinball Game
  14. Game Center
  15. Best Tools for cocos2D Development
  16. Kobold2D Fundamentals
  17. Out of the Ordinary
Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

* Required Fields

On page 54:
CCSceneTransition

This is a nonexistent class. It should be

CCTransitionScene

On page 93:
In listing 4-6 after the comment
//we must limit the maximum velocity of the player sprite, in both directions

the else if statement does not have a valid comparison:

}else if {playerVelocity.x - maxVelocity)
{
...
}

On page 98:
Listing 4-10

The for loop after the initialization of numSpiders is not initialized correctly it reads as:

for (int i = 0; i {
//put each spider at its...

On page 196:

In listing:
#import "Bullet.h"

there is no information about this file/class in your book