… 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.
I’ve updated the book’s product page and included links where you can download the source code for the 3rd edition.
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.
Learn more about the Learn Cocos2D 2 book here.
Kobold2D v1.0 is now available from the Kobold2D Download page!
This is mainly a maintenance release, I found and fixed all the bugs that had been reported, including some nasty linker issues that occurred with a preference on Snow Leopard. Kobold2D is now thoroughly tested with Xcode 4.0.2, 4.1 and 4.2 under Snow Leopard and Xcode 4.2 under Lion.
Of course the latest updates of cocos2d-iphone-extensions 0.2 and cocos3d 0.6.3 are also included.
And I can’t say it often enough: Kobold2D supports ARC (automatic reference counting) out of the box! There’s nothing you need to do! Just have Xcode 4.2 installed and start writing code without retain, release and autorelease ever again.
Forward Looking Statement
The motto for the next updates is still “Get Connected!”. I want to add more online features and update the KKGameKitHelper class with remote config support provided by AppMynx. I will evaluate ShareKit and hopefully be able to implement that with (if necessary) a reasonably simple interface for Cocos2D apps.
I also have a commercial product for iOS in development that will make sending data over the network a lot simpler. The basic idea being that if, for example, you want to synchronize a sprite’s position and rotation properties with all other devices, you simply write something like this:
[cc lang="cpp"]
[KKConnect addSharedObject:self
identifier:@"Player1"
properties:@selector(position),
@selector(rotation),
nil];
[/cc]
It works with any properties (except id/pointers). Whenever one of the property values changes, its value is sent to all connected devices and assigned to the property of the local object with the corresponding “Player1″ identifier. Dead simple. And coming soon.
Learn Cocos2D Game Development with iOS 5
It’s also no coincidence that the print and PDF versions of the Learn Cocos2D Game Development book (2nd Edition) are available since a few days.
The book uses Cocos2D v1.0.1, the chapters have been significantly improved, Chapter 3 is almost a complete rewrite. There are also two new chapters discussing integration of UIKit views in a Cocos2D app, as well as adding Cocos2D to an existing UIKit app. The other new chapter is about Kobold2D and introduces Lua and Cocos3D.
Readers keep asking me when the Kindle or iBooks versions of the new edition will be out. To be honest: I don’t know. But I’m confident that there will be a Kindle version and one for iBook eventually, and I expect these to be available soon. After all the first Edition is also available through these channels, and so are most (if not all) Apress books. Plus Xmas is coming, just like most companies book publishers are eager to get their best products out the door in time for Xmas.
Scheduled for release on November 7th, 2011. Continue reading »
Learn Cocos2D 2 (Third Edition)Release Date: August 29, 2012 Also explains TexturePacker, PhysicsEditor, Tiled, Glyph Designer, Particle Designer and other tools. Source code is compatible with Xcode 4.4, iOS 6 and Mountain Lion (Mac OS X 10.8). Download Source Code (3rd Edition):Cocos2D Source Code (ARC) (Cocos2D v2.0; includes 12 Cocos2D ARC templates) Exact game engine versions used by the book: |
|
Second EditionRelease Date: November 9, 2011
Download Source Code (2nd Edition): |
First EditionRelease Date: December 2, 2010 Download Source Code (1st Edition): |
Full Description
Create compelling 2D games with Learn cocos2d 2: Game Development with iOS. This book shows you how to use the powerful new cocos2d, version 2 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 pre-configured libraries, including Lua.
Best of all, this book 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 new cocos2d 2 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 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.
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.
Learn Cocos2D Book Reviews
Today, after several delays I finally got around to start updating the Learn Cocos2D book to its second edition. The second edition is due to be published in summer, likely in July/August.
I decided I’ll easy myself into it and start by updating the first chapter. There’s no code and relatively little to change. The biggest addition here is the list of popular Cocos2D game engines I wanted to add. Here’s a screenshot of the comparison table I added:

Note: the link to cocos2d should have been http://www.cocos2d.org
The list doesn’t include all of the cocos2d ports, just those that are mature, stable and relatively up-to-date. I also completely removed the paragraph about Section 3.3.1 because that topic fortunately is no longer an issue.
Errata Corrigata
Next I started to go through all of the 108 erratas that were posted on the Apress site. If you’re interested, here’s the errata list as xlsx or as csv file with emails and names of reporters removed.
I knew that there were duplicates but I didn’t expect over 50% of the errata to focus on only two things: the mixed up images 3-1 and 3-2 was by far the most often reported errata. Following that were two packs of spider variables either not being declared or not being initialized in chapter 4. Those led to compile errors in one case and non-dropping spiders in the other – if you were typing in the code straight from the book.
After I had removed all duplicates I was left with 28 unique and usable errata items that I’m going to look into, and 14 of those I was able to fix today.
Once I’m done with those I’ll be going through the painstaking process of updating no less than 72 Xcode projects from cocos2d v0.99.3 to v0.99.5 to cocos2d v1.0. Or maybe I’ll just wait a couple more days for the final v1.0.
From the Apress website:

The iPhone-developing Cocos2D crowd beats the .NET afficionados! Kudos and thanks!
Mike Kasprzak has been a full-time indie game developer for five years now. He quit his job as Technical Director at Canadian game company Big Blue Bubble, with the words “being too ambitious for my own good”. What followed were 5 years of attempting to strike big as an Indie but, well, not doing so well after all in the XNA space. But things turned for the better when the iPhone SDK came along. In 2008 he created and released the puzzle game Smiles, it grew in popularity over time and from the lessons learned Mike began to make ports of the game, including Windows Phone 7. The game even won him a car!
Read Mike’s recap of his past five years being a full-time indie game developer.
Make sure you also check out his blog tooNormal ?! where you can learn a few more things about Mike. He is also running the Ludum Dare game competition and he wrote a chapter about writing portable code in the iPhone Games Projects book published by Apress.
Add your link to the Cocos2D Linkvent Calendar
Do you have something to share with the Cocos2D community? I haven’t received enough submissions to fill all the days until Xmas, although I do have enough links to post one each day, I’d rather post a link to your website or blog post.
Just today I was informed that the eBook version of Learn iPhone and iPad Cocos2D Game Development is now available in its final form!
UPDATE: the source code download (also on the book’s page, left side, under Book Resources) now includes all of the source code.
The print edition will follow sometime soon, hopefully within the next ~3 weeks.
On a related note, Ray Wenderlich joined forces with Rod Strougo to help finish Rod’s Cocos2D book, due to an oddly scheduled release date whose publisher apparently feels impossible to postpone. By that I mean to say: Rod’s wife is having a baby. Congratulations to that, and the book!










