My Line-Drawing Game Starterkit is now up to date with the latest versions of cocos2d (v1.0.1), iOS (compatible with iOS 3.1 and higher, including iOS 5.0), Xcode (compatible with Xcode 3.2 and above, including Xcode 4.0 on Snow Leopard and Xcode 4.2 on Mac OS X Lion).
Existing customers will receive an email with instructions on how to download the updated version of the Line-Drawing Game Starterkit.
Ferries HD was made with the Line-Drawing Starterkit
I’ve added another cool game made to the Line-Drawing Starterkit product page - Ferries HD by Thomas Busse:
Note: the game is not included in the Starterkit. It’s a game that was made with the Starterkit and serves as a great example of what you can achieve with the Line-Drawing Game Starterkit.
Price dropped to $99 (from $119)
I dropped the price of the Line-Drawing Game Starterkit to $99 in anticipation of upcoming commercial source code products that I’m working on. More on that in due time, first things first (Learn Cocos2D 2nd Edition and Kobold2D).
What about Kobold2D?
I know, I know. Kobold2D isn’t too far out. I anticipate the first preview (beta) release in August. Stay alert.
What’s left to do at a minimum is to write the Project Starter tool (to give you the convenience of Xcode 4 Project Templates but with more flexibility), setup the website with the “getting started” documentation plus API references and perform some general project cleanup.
And when is the Learn Cocos2D 2nd Edition coming out?
It looks like the new edition of the book will be out in October, roughly two months later than anticipated.
On the positive side I’m working with a new editor who brought in a fresh perspective from which the book greatly benefits. The delay also allowed me to make more substantial improvements than initially planned.
In particular Chapter 3 (Essentials) was completely overhauled to better explain the fundamental concepts of Cocos2D, and you’ll find the book to be more visually rich in general. For example this exploded view drawing is used to explain the relationship of Scenes, Layers and Nodes:
The book’s source code already uses the recently released Cocos2D v1.0.1 and I will continue to update the book’s source code for the v1.x line of Cocos2D. Several of the game projects discussed in the book will also be ported to become Kobold2D project templates.
Cocos2D is finally and officially carrying the version number v1.0. Without any beta, unstable, rc suffixes.
I’ve updated my Cocos2D Installer Package (.pkg) to use the latest v1.0 and removed the v0.99.5 version, which cut the download size in half (35 MB). Cocos3D is still included of course. And as always, the main reason why you would want to use the installer is to avoid any issues installing the Cocos2D Xcode Project Template and File Templates.
You can download the Cocos2D Installer through Cocos2D Central or directly from here via this hotlink.
The Cocos2D Installer has been superseded by Kobold2D!
Since you’re looking to install Cocos2D, you may be interested to hear about the Kobold2D game engine. Kobold2D is designed to make Cocos2D developers more productive. Of course it comes with an installer, and includes Cocos2D.
Original Post
With the release of the unstable cocos2d-iphone v1.0.0 rc3 version today I’ve updated the Cocos2D Installer to include this new version, as well as an updated version of Cocos3D (v0.5.4). The installer will install the Xcode templates for you for both cocos2d and cocos3d in both Xcode 3 and Xcode 4 versions.
Download the Cocos2D Installer (66 MB)
The Cocos2D installer includes cocos2d-iphone v0.99.5 (stable) & v1.0.0 rc3 (unstable) and cocos3d v0.5.4.
Cocos2D/Cocos3D will be installed to the user’s Documents folder in appropriately named subfolders. You can move these folders after installation to another folder without breaking anything.
The most frequent questions I get from readers of my Learn Cocos2D book:
- “Where can I download the source code?”
- “Why do I get compile errors in CCLabel?”
- “Is there an updated version of CCAnimationHelper?”
They all boil down to the fact that the book was written against cocos2d-iphone v0.99.5 with some projects using v0.99.4 and a few even had used v0.99.3.
Unfortunately this is also why some readers deducted one or more stars in their Amazon book reviews. Even more unfortunate because the changes that break the code were entirely cosmetic (renamed classes, function parameters removed or re-ordered, deprecated functions in favor of others). All changes required only fixing the lines using one of these outdated classes (CCLabel, CCLayerColor) or functions (bitmapFontAtlasWithString, frameWithTexture, …).
Quick List of Changes
I kept track of the changes I made to the source code. This is what it boils down to:
- remove: EAGLView viewWith… -> remove last parameter: preserveBackBuffer:NO
- remove: CCSpriteFrame: frameWithTexture -> remove last parameter: offset:CGPointZero
- remove: CCAnimation: animationWithName -> animationWithFrames & remove last parameter: frames
- rename: CCLabel -> CCLabelTTF
- rename: CCBitmapFontAtlas -> CCLabelBMFont
- rename: CCBitmapFontAtlas: bitmapFontAtlasWithString -> labelWithString
- rename: CCXxxxxTransition -> CCTransitionXxxxx
- rename: CCColorLayer -> CCLayerColor
- rename: CCQuadParticleSystem -> CCParticleSystemQuad
- rename: particle system: centerOfGravity -> sourcePosition
- change: particle system: use NSUInteger instead of int for initWithParticleCount
These are the changes affecting the book’s source code. There were some more changes in the cocos2d-iphone engine, for example some actions have been renamed as well.
Good News: Updated Source Code for v1.0
I updated the book’s source code to use cocos2d-iphone v1.0.0 rc2. Once the v1.0 final is released I’ll make another update.
You can get the book’s source code from the Learn Cocos2D Book product page (scroll to the bottom), or via this direct download link. The download is about 100 MB and contains all the chapter’s source code plus some extra projects not mentioned in the book, and all of them (over 70!) are now using cocos2d-iphone v1.0.
Note: This code obviously differs slightly from the code described in the first edition of the Learn Cocos2D book, so you should get the unmodified v0.99.x book source code as well.
Upgrading to Cocos2D v1.0
I also recently wrote a tutorial outlining the steps to update an existing cocos2d-iphone v0.99.x project to v1.0 in case you have an existing project that you’d like to upgrade to the latest Cocos2D version.
Learn Cocos2D: Second Edition
All these changes will be reflected in the second edition of the Learn Cocos2D book.
The second edition will be released summer 2011, likely around July to August. This is my estimate based on the fact that my work is scheduled to be completed on June 27th, and I’m working hard to keep that (tight) schedule.
Actually, make that we are working hard. The second edition of the Learn Cocos2D book will have contributions from a co-author. Someone who is well-known in the Cocos2D community! To be unveiled.
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.
I have updated the unofficial Cocos2D installer to include the cocos2d-iphone-v1.0.0-rc version so that you can use the Xcode 4 templates. I also added Cocos3D so that you don’t have to run its install scripts anymore.
The installer now installs the following folders to your ~/Documents folder:
- cocos2d-iphone-0.99.5 (latest stable)
- cocos2d-iphone-1.0.0-rc (latest unstable)
- cocos3d-0.5.3 (latest beta)
Warning: Project Templates are buggy!
Depending on Cocos2D/3D version and the version of Xcode, you’ll notice that some of the project templates will not compile without manually fixing some compile errors. This has nothing to do with the installer, the same thing happens when you install the templates manually with the .sh scripts.
For example, the project templates for cocos2d-iphone-1.0.0-rc do not work in Xcode 3 - the ones for Xcode 4 work fine. The Cocos3D project template does not work out of the box in Xcode 4, you have to manually copy and add the Cocos3D files (refer to the readme for more info). The version for Xcode 3 works fine.
Based on the Xcode version you currently use for developing new Cocos2D projects:
- Xcode 3: use the Cocos2D v0.99.5 and Cocos3D Project Templates to start new projects. You can manually update to Cocos2D v1.0.0 afterwards.
- Xcode 4: you will have to start with Cocos2D v1.0.0 (rc). If you want to develop Cocos3D applications, refer to the readme to learn the manual steps involved in creating a working Cocos3D project.
I assume we’re all eagerly awaiting for cocos2 v1.0 and to be given a download link to click on. The year 2010 started so promising, with v0.9 going through beta during end of 2009 and beginning of 2010. This v0.9 never came out of beta but was re-labelled as v0.99 and released as final version in February 2010 (if I remember correctly, it was either due to the amount of changes or the closeness to v1.0 that it was labelled v0.99). At this point I was thinking that by the end of spring, at the very least, we’d have a final v1.0 of cocos2d.
But 8 months later we’ve just seen v0.99.5 beta 3 release but no v1.0 in sight yet. I’m growing impatient. I’m wondering what the holdup is? The version labels seem to grow longer and longer, as if the labels were trying to prove the point that you can still have an infinity between 0.99 and 1.0 - if you only add enough digits and other stuff after the decimal sign this could go on forever.
So, please, for the love of god, just label it v1.0 already and lets get on with regular 0.1 steps from then on!
Just out of curiosity, I made a quick spreadsheet and hacked the average time between updates in, and it told me that according to this year’s release schedule v0.99.7 will be released on December 24th, 2010 and v1.0 sometime May next year. If version number updates continued at this rate, don’t hold your breath for v1.1 before the second half of 2012.
It’s just a silly estimation based on average days between new versions and their respective version numbers, so don’t take this seriously, or the wrong way. I’m merely growing annoyed and concerned how cocos2d progress has not been reflected in the version numbers in all of 2010, and how version numbers have grown out of proportion and anything I can relate to. Not that it’s any of my concern, but I do believe that doesn’t do cocos2d a good service to continue to label new versions like “0.99.5 beta 3”, and it certainly doesn’t help to portray it in the right light if you compare it to the progress other engines have made over the same period of time - if only in version numbers.
It’s almost as if going “v1.0” meant that cocos2d would be losing its virginity, and that being a life-changing event it shouldn’t happen without about a year of dating, right?
Right?
Well, for what it’s worth, I would suggest taking on the pretty-much-standard versioning style: major version dot minor version dot bugfix/hotfix (non-breaking) releases dot build number. Then go back to the regular release cycle with about two months for each 0.1 step, regardless of what the major number is.
I mean, a major version number change should still introduce something awesome, or useful, or practical, or helpful - in that case just skip the remaining 0.5 or so ahead and bump the major version right away. Personally, if HD support is in and points instead of pixels (what a concept) then that would be it for me. That would be a good v1.0. Get it done and all the bugs fixed, and label it v1.0 so we can all start looking forward to more reasonably labelled releases. Really, it just doesn’t matter that much if you change the first frickin’ number from 0 to 1.
Personally, I would have preferred if cocos2d were now closing in on v2.0. That would be about the version we might be at if the rate from 0.5 through 0.8 had continued at the past update rate. And a v2.0 would be absolutely justified for cocos2d, and I suppose a lot of people would feel much better working with a v2.0 than the current unstable 0.99.5 beta 3.
I hope we won’t see this happening again when cocos2d tries to get pregnant, and labels itself something like “v1.98.7 beta 6 final alpha” around that time to reflect the process, or progress, or lack thereof, or hormone levels, or morning sickness intensity, or whatever.
It’s a frickin’ version number, that’s all that it is!
And it needs some serious increasing to catch up with its level of maturity. Think about what that means to how cocos2d is first perceived by an outsider.
Heck, Unity is now at v3.0, SIO2 is racing towards v2.0, Shiva is close to v1.9 and even the slow-to-release-updates iTorque has gotten to v1.4 by now. Cocos2d is still afraid to go even v1.0 and it’s a shame, because it hurts its reputation, it doesn’t do itself justice, it’s likely to be perceived as being behind the pack and it doesn’t look good in terms of actual progress being made, regardless of the actual work that’s been done this year.