This quick comparison sheet gives you all the info to decide whether to use Cocos2D 1.x or Cocos2D 2.x. Contrary to most programs, a higher version number doesn’t infer “better” or “more”. There are pros and cons for both versions.
At the time of this writing the decision really only boils down to whether you want to use shaders and whether you must be able to deploy your app to 1st & 2nd generation devices. See for yourself, it’s that simple:
Cocos2D v1.x(+) compatible with all iOS devices |
Cocos2D v2.x(+) OpenGL ES 2.0 shader programs |
All other differences to this day are minor, and most new features and bugfixes have been migrated back and forth between versions. For beginners I strongly recommend using v1.x as there’s a lot more documentation available for this version. Those who have no interest in writing shader programs can also safely use the v1.x branch without missing out.
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 »
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.
Today I completed the first draft of the Kobold2D chapter which will be in the second edition of the Learn Cocos2D book. In that chapter I’m also giving you an introduction to cocos3d, the official 3D add-on library for cocos2d. I ported cocos3d’s Xcode project template to Kobold2D and spiced it up a little with some cocos2d nodes in the back- and foreground:
Notice the “incoming network connection” warning. This is caused by the iSimulate library which is distributed with Kobold2D and activated by default for Simulator builds. You still need to buy the iSimulate App to benefit from it though. If you don’t you can also choose to ignore the dialog or simply disable iSimulate by commenting out a line in the project’s BuildSettings-iOS.xcconfig file.
I’ve also had great fun with the augmented reality option that the cocos3d CCNodeController class provides. And setting it up is one line of code. Here’s the “camera as live background” demo in action:
Since a picture doesn’t really do it justice, here’s a video:
Admittedly it could run a little faster on my iPhone 3G. It’s pretty taxed and averages around 20 fps with the camera background view and rendering a 3D model. My iPod Touch 4 averages at around 40 fps and it feels a lot smoother.
Kobold2D Todo List
One of the biggest items on my todo list for Kobold2D is to design the website and get rid of the “coming soon” page. This includes setting up the wiki and filling it with content, documentation for the most part. And, well, paying $150 each month because I don’t see any alternative to using Confluence. I want to enjoy working on documentation, and I want you to enjoy browsing and reading it.
I also want to create more template projects. Currently, as you can see in the first screenshot, there’s Hello Kobold2D (iOS & Mac), Hello Cocos3D (iOS) and Hello Cocos2D-X (iOS). I want to add two more templates, one for Chipmunk with SpaceManager (iOS & Mac) and one for Box2D (iOS & Mac). I also want to add the projects from my book as project templates, namely Doodle Drop, the Shoot ’em Up game, the Orthogonal and the Isometric Tilemap projects, and the Cocos2D With UIKit project (all iOS).
Even though Kobold2D won’t have Xcode 4 Project Templates I still want to give you a quick and easy way start a new project based on one of the template projects. Notice the distinction between “project template” (those in Xcode’s New Project dialog) and “template project” (a regular, already existing project). I started writing a tool that allows you to create a copy of an existing Kobold2D template project and rename it, so that the workflow is just as convenient as doing it within Xcode. It works for the specific template I tested it with, but I still have to design the user interface and make the code fail-safe.
In case you wonder why Kobold2D won’t have Xcode Project Templates: they are not nearly as powerful as they would have to be. And they’re a pain in the rear to create and maintain without some tool support. But worst of all, you have no way of including files in an Xcode 4 project template that must not be added to the Project Navigator. Like, for example, .xcodeproj files.