So, here speaketh the market crier for Kobold2D. What’s new and noteworthy about this version of Kobold2D, you ask?

Built-In Gesture Recognition

Recognizing gestures has never been this easy. No (speak: zero) iOS SDK knowledge required! All gesture recognizers provided by the iOS SDK are implemented:Tap, Double-Tap, Long-Press, Swipe, Pan, Rotation and Pinch.

Here’s how you would enable both rotate and pinch gestures simultaneously to provide a rotate & zoom action on a sprite:

Radians, degrees? Who gives a f#§$ if the angle is already in the format Cocos2D expects it to be, right? It doesn’t get any simpler and easier than this! Unless you live in a Star Trek world (hey, invite me in!).

Notice how you don’t need to f#$§ing know how, when, or where to convert the touch locations. Touch locations are already converted to Cocos2D’s OpenGL view coordinates. Let alone the fact that you can work with touches anywhere, in any class and method. What you see here is a game engine doing what it is supposed to be doing: taking care of the things you shouldn’t need to concern yourself with.

Speaking of which:

What do you do if you want to know if a touch was on a sprite? Make it complicated, let’s assume the sprite is scaled and rotated. Hmmm … well, Kobold2D makes that mindlessly simple too:

Support for Core Motion and Gyroscope

KKInput gives you access to DeviceMotion data in a similarly simple fashion. Device Motion is combined accelerometer and gyroscope input which, through sensor fusion, provides much better controls on devices that support it (4th generation, iPad 2). Again, no knowledge of the iOS Core Motion framework required. None at all.

Device Motion acceleration is already filtered into two components: user acceleration and gravity acceleration. You also get access to Euler angles (roll, pitch, yaw) to learn about the device’s orientation (attitude). And of course the gyroscope’s rotation rate.

Google AdMob Banner Integration

Thanks to Simon Jewell who provided me with the initial Google AdMob implementation for Kobold2D, the Ad banner support got an overhaul.

You can now choose between iAd and AdMob as ad providers, and use AdMob as a fallback option on devices where iAd isn’t available. The entire configuration of ad banners is done in the config.lua file, no programming required!

Just get your app setup for iAd in iTunes Connect respectively obtain your AdMob publisher ID, and you’re ready to make some money from free apps! Since AdMob works on all devices, pays via PayPal, and doesn’t require the lengthy contract, tax and bank account setup that Apple does, it perfect for anyone who wants to see results (ie money) quick and easy. See the instructions in the Ad Banner documentation for guidance on how to become an affiliate in the iAd and AdMob systems.

UIKit View Integration, with Hit Testing!

The second edition of my Learn Cocos2D book has an entire Chapter dedicated to integrating UIKit views with Cocos2D (and also integrating Cocos2D to an existing UIKit app). One of the UIKit integration example projects from the book is now included in Kobold2D.

There’s a gem in that project: the UIKit views are both in front of and behind the Cocos2D OpenGL view. And if that weren’t enough, I’ve added a hit testing flag to config.lua and the Cocos2D OpenGL view so that touches are properly recognized by UIKit views and Cocos2D nodes, whether they’re in the foreground or in the background, whether they’re rotated or scaled.

Box2D v2.2.1 with updated Template Projects

Box2D has a new version that Kobold2D now uses. The Box2D API changed a bit, but you can look up the necessary changes to world initialization, the GLESDebugDraw class, setting the screen bounding body, and other things in the Box2D and Pinball game template projects.

The No-Brainer: iOS 5 & Xcode 4.2 Compatibility

Kobold2D is now extensively tested with both Xcode 4.2 / iOS 5 and Xcode 4.1 / iOS 4.3. If you’re using Xcode 4.2 / iOS 5 you’ll automatically get the benefit of the new Apple LLVM 3.0 compiler. Note that LLVM 3.0 has an increased nagging level, and will issue compiler warnings and errors where there were none before. This is normal, and not Kobold2D’s fault.

FAQ: Common Issues, Simple Explanations

I realized that a nagging, inexplicable issue turned out to be nothing than an old, die-hard habit of opening .xcodeproj files instead of .xcodeworkspace. Another common issue is not changing the default scheme from “box2d-ios” to the actual project scheme. It’ll build but of course one can’t “run” the Box2D library by itself.

Kobold2D projects – as much as it pains me to say it as proponent of warning-free code – now build successfully even if there are warnings in your projects. You complained, I caved i … err, I listened! 😀

What are you waiting for?

Head on over and download the latest (and last) Kobold2D Preview 5. By “last” I mean that in about two weeks, when the second edition of Learn Cocos2D hopefully hits the streets, I will release the “official”, non-preview version 1.0 of Kobold2D.

If you run into any issues, need help or just want to talk about Kobold2D, please don’t hesitate to use the Kobold2D forum. Likewise, if there’s something you’d love to see in Kobold2D, suggest it and/or vote on existing suggestions in the Kobold2D Feedback area. Thank you for your time!

Of course I would highly appreciate it if you could help spread the word and click on those tweet, like and plus-one buttons. Here and in particular on the Kobold2D website. Thanks again!

I very much enjoy the learning process, the pushing of boundaries (mine and yours and that of technology), having the freedom to pursue whatever is on my mind, to boldly program what no one has programmed before, and to write about what I've learned. Help me help you by browsing the products in the Learn Cocos2D Store.

It’s one of the things I fixed, so yes: the Upgrader tool is now working under Snow Leopard. I simply forgot to set the deployment target of the project to 10.6, there’s nothing Lion-specific in the tool.

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 …