What’s in the book?

The book will guide you through the creation of a physics-driven, parallax-scrolling game with the help of SpriteBuilder, Cocos2D (cocos2d-swift) and Objective-C. The level-based structure will enable you to add more content to the game, even without writing additional code.

As your guide I will walk you through the individual steps necessary to create the game project. Along the way I’ll explain the SpriteBuilder features, caveats, workarounds and helpful tips and tricks as you are most likely to come across or need them.

Actually it’s chapters 2 through 4 because I’ve learned that the details in the first chapters tend to change significantly. This includes version numbers but also highlighted features, tool and project names, and so on.

Chapter Summary

Following is a summary of each chapter thus far.

Chapter 2 “Laying the Groundwork” first introduces the SpriteBuilder user interface but also Cocos2D (-iphone/-swift) programming basics. I really went above and beyond existing SpriteBuilder user interface tutorials to explain even the smaller details that boggled my mind when I was learning SpriteBuilder. You’ll learn the difference between Scene, Node or Layer CCBs. The effect of position, content size and scale modes (points, UI points, %, insets). What all the nodes are and what they are used for. But also how to make the code connections and what the difference between CCBReader load and loadAsScene is. The importance of Sub File nodes and the Tileless Editor View.

At the end you’ll have a firm grasp on SpriteBuilder basics and a project framework with two scenes and transitions between both scenes.

I’m excited to announce that I am writing a new book, titled Learn SpriteBuilder. It will be published by Apress and is both sponsored and supported by Apportable with top-notch graphics.

Over the course of the book you will create a level-based, parallax-scrolling game that’s not unlike Badland with some elements from Leo’s Fortune. The game will be complete with main menu, settings, level selection, pause and game over menus, music and sound effects, and room to extend the game with your own ideas, levels, code and other content.

Learn SpriteBuilder is not a direct sequel to ‘Learn Cocos2d’; its focus is on teaching efficient workflows with SpriteBuilder and demonstrating the connection between SpriteBuilder and cocos2d-iphone v3 (now known as cocos2d-swift). Still there’s plenty of Objective-C code necessary to build an iOS game and I’ll take extra care to explain it well, in particular the new Cocos2D v3 features.

The Learn SpriteBuilder book is aimed at beginning to intermediate Cocos2D and SpriteBuilder developers but also experienced Cocos2D developers who are interested in learning more advanced concepts. Among them are the new visual effects system currently in development for Cocos2D and a fully textured, deformable soft-body player character.

Three chapters alone are dedicated to physics editing with SpriteBuilder and physics programming with Objective-Chipmunk.

Frequently Asked Questions

Please leave a comment if you can’t find your question answered in this FAQ.

Paralaxer: Cross-Platform Platformer Kit

Paralaxer is possibly the first commercial game kit available that uses Cocos2D-X. Ported to iOS, Android, Windows and Mac it also comes with a free ebook “How to Make a Platformer Game With Cocos2D-X” by Nat Weiss – who previously created the iPhone Action RPG engine.

KoboldTouch brings you the best 2D game development experience for Apple’s platforms!

KoboldTouch is the only Objective-C, ARC-enabled 2D game engine built on the Model-View-Controller (MVC) design pattern. Write ambitious games with greater ease!

KoboldTouch is also a continuously evolving, customer driven game development framework for iOS & Mac OS X, designed by game industry veterans to incorporate game development best practices and decades of experience.

But that isn’t all!

Essential Cocos2D – The Definitive Reference is an online documentation for cocos2d-iphone 2.0 and Kobold2D. More details soon. In the meantime, here’s a sample chapter about How Draw Order Works in Cocos2D.

… but not quite out yet. If you can’t wait until August 29 you can always buy the Alpha eBook version now (as PDF) and receive the final eBook version for free (as PDF, ePUB and MOBI) when it’s available.

Learn cocos2d 2 (Third Edition)

Release Date: August 29, 2012

What’s New

Cocos2D v2.0 is used throughout the book. To my knowledge this makes the Learn Cocos2D 2 book the first book to cover cocos2d-iphone v2.0.

ARC (automatic reference counting) is used exclusively in the book. All descriptions and source code projects have been updated to ARC, and 12 Cocos2D ARC-enabled Template Projects are included in the source code download. The book contains a description on how to enable ARC in a cocos2d project. Working with ARC means having to write and learn less code while being able to write faster code with fewer bugs. Win, win, win.

You can now also follow the book while using Kobold2D. Any differences between cocos2d v2.0 and Kobold2D v2.0 are explicitly mentioned in the book. In fact, you’ll have to work through less text and code if you use Kobold2D.

The book’s source code is compatible with Xcode 4.4, Mac OS X 10.8 Mountain Lion and iOS 6. It is of course also tested to work with Xcode 4.3, Mac OS X 10.7 Lion and iOS 5.

About Me

I started my game industry career in 1999 creating Gameboy titles as designer, followed by working as software engineer on RTS/RPG series SpellForce and BattleForge for a studio that was acquired by EA in 2006.

Since 2010 I'm a freelance developer, specialising on 2D game development for mobile.

Try out TilemapKit!

TilemapKit is the complete solution for tilemap game developers. Click an image to learn more!

Iso Map rendered by TilemapKit

Ortho Map rendered by TilemapKit

Hex Map rendered by TilemapKit

Steffen's Books

The iOS Action RPG Engine

Rapidly create your own RPG or action-adventure game with this complete starter kit. Includes an ebook, game source code and a royalty-free art package.More Affiliate Products …