Looking for a Sprite Kit Game Engine? Check out Kobold Kit!

In case you missed the news: Sprite Kit is Apple’s 2D rendering engine for games, announced with iOS 7 at WWDC 2013 by merely mentioning it among other new APIs. A small step for Apple, a giant leap for gamedeveloperkind. This changes everything!

Many compare Sprite Kit with cocos2d-iphone. Don’t ask me why, they just do. 😉

If you’re a registered Apple developer you can check out the Sprite Kit Programming Guide and the SpriteKit.framework reference yourself.

Sprite Kit is under NDA, like the rest of iOS 7, so I won’t spell out any details here. I posted my list of strengths and weaknesses of Sprite Kit on the developer forum, where we can freely discuss such details.

Here let me just try to answer the questions: why did Apple create Sprite Kit, and why now?

The Biggie: Apple acknowledges games!

Apple finally understands the significance of games for their platforms! Sprite Kit is acknowledgement of that fact. Rejoice!

Especially if you consider the rumored Apple TV set: imagine a television set that runs iOS with an App Store to download and buy YOUR games. Interestingly, iOS 7 also adds an API for 3rd party game controllers, think of joypads, like those you get with an Xbox or Playstation.

Continue reading »

Generate Tilemap Physics Collision Shapes with Cocos2D

On June 1, 2013, in idevblogaday, by Steffen Itterheim

Screen Shot 2013-05-31 at 00.59.01 You have a tilemap and you want physics collisions on it? The solution seems obvious: create a rectangle shape for every blocking tile.

But ouch! This solution is not just hugely wasteful and unnecessarily slows down the physics collision code, it also introduces the well known problem of characters getting stuck even on flat surfaces.

This is in particular a problem for Box2D because its collision mechanic doesn’t work well with flat surfaces subdivided into smaller segments (rectangle shapes in this case).

A workable but still very awkward solution to work around this behavior is to create characters with bevelled edges at the character shape’s bottom at the risk of bopping characters as they walk about the map.

Lupines in the Moore Neighborhood

A good solution to generate physics collisions is to implement the Moore Neighborhood algorithm to generate chain shapes which are more suitable for tilemap collisions. The downside is that adding or removing individual blocking tiles at runtime requires updating the shapes - this is not implemented in this project.

Every flat surface, no matter how many tiles form the surface, will then consist of only one straight collision segment. Here’s a quick demo video of the project discussed in this post that shows the algorithm at work and the resulting “game”:

Continue reading »

KoboldTouch v6.2.2 is now available.

New features are a iOS Storyboard template project and support for Arcade controllers like iCade (all variants), GameDock (2 Players) and compatible controllers.

Storyboard Template

Screen Shot 2013-05-22 at 19.11.05

There are plenty of Storyboard + Cocos2D tutorials but none seem to get it quite right. After I wrote my Cocos2D Storyboard tutorial I went in for the kill, made it work with KoboldTouch and a couple improvements along the way, too.

One of the advantages of this Storyboard implementation is that you can return to a previous scene, continuing where you left off. You can of course also change scenes whenever you segue into a KoboldTouch scene. And you can have several KoboldTouch scenes side-by-side and differentiate easily which one was segue’ed into.

Here’s the KoboldTouch Storyboard Documentation which explains how to start a Storyboard project, which classes to use and the things that are different compared to a regular fullscreen KoboldTouch app.

Arcade Controller and Joypad Input

iCade_angle_media

You may have heard of the iCade cabinet (pictured) to play arcade games like in the Arcade with joystick and 8 buttons. Maybe you already own one. And then there’s Kickstarter-backed GameDock, which features two gamepads for 2-Player action and HDMI output to your TV.

Here’s a quick demo of the iCade Core working with the (admittedly barebones) KoboldTouch arcade input controller demo:

iCade and GameDock are fun and exciting devices which already have hundreds of games supporting them! And those aren’t the only ones, there are several other Bluetooth joypad controllers compatible with iCade, like the Snakebyte idroid:con.

KoboldTouch makes it super-easy to use iCade, GameDock and compatible Bluetooth controllers!

Cocos2D v2.1 and Storyboards: Done Right!

On May 17, 2013, in idevblogaday, by Steffen Itterheim

Screen Shot 2013-05-17 at 01.05.51There are many Cocos2D + Storyboard tutorials, it’s about time to do another one that’s done right. Also, this one’s backwards: we’ll start with a Cocos2D template and then add Storyboards to it. The tutorial will work for existing Cocos2D projects to which you wish to add Storyboards, too!

I’ll show you how to add Storyboards to a Cocos2D v2.1 project, with ARC enabled of course. This approach will take a little more work, but the solution will be complete and you gain a fair understanding of how things work together. Plus two custom but reusable View and Navigation controller classes, and I’ll show you what changes you need to make to the AppDelegate.

The resulting project will work with iOS 5 and iOS 6 and autorotation. The navigation and cocos view controllers are separated, and you will be able to subclass them for code customizations as is customary in Cocoa. Cool? Cool, cool, cool!

As usual you can grab the example project (Cocos2D + Box2D + Storyboards with ARC enabled) from github. I’ll also be adding a Storyboards template project to KoboldTouch in the next update, and document what’s special about the KoboldTouch solution.

Oh, only one thing … this tutorial is part of Essential Cocos2D. Head on over and enjoy!

KoboldTouch v6.2 now available!

On May 2, 2013, in idevblogaday, KoboldTouch, by Steffen Itterheim

KoboldTouch v6.2 marks the third major milestone for KoboldTouch. It also marks the longest development cycle between two updates: exactly 30 days.

That’s 30 days packed with new features, improvements and bugfixes, there’s a new development blog for the work-in-progress “Angry Trains” starterkit and slowly but surely the documentation is coming together.

So let’s check out the exciting new features in KoboldTouch v6.2:

Objective-C Box2D Physics wrapper

The Objective-C wrapper for Box2D (aka “Boxjective2D”) is now in a state that I feel very comfortable with. And proud. It’s the only Box2D Objective-C wrapper that’s both fairly complete and supported and will be continuously improved. It’s also stable, super-slick and easy to use, highly efficient without compromising integrity (ie no @private vars) and you can always access the underlying Box2D objects.

The following Box2D components are wrapped in Objective-C classes, which is about 80% of the public API of Box2D (and I won’t stop there):

Continue reading »

Everyone knows how to add a UIView to an iOS app built with cocos2d-iphone. It’s straightforward, just create the view and then call:

There. Now suppose you want to do the same on Mac OS X. HA! HA! Hawww!

Cocoa’s laughing at your feeble attempts. It’s really just Cocoa’s fault though. Having done a fair amount of work with both SDKs, the Cocoa on OS X just feels … old. Backwards. Confuscated. No, not confusing, literally confuscated - it can’t even spell confusing like everyone else does.

But … there is always a way. On OS X it’s just more often than on iOS a matter of finding the right way. It can be done. Here’s proof:

The Right Way™

The trick here is to create an additional “overlay” NSWindow that’ll hold all of your views. Actually, it’s not the overlay window it’s the overlay window’s content view, which is just an empty NSView. But first things first, step by step.

Continue reading »

Tagged with:  

Kobold2D v2.1 now available!

On February 23, 2013, in cocos2d, Kobold2D, by Steffen Itterheim

I am so very happy to … no, actually I’m relieved Kobold2D is working fine again with the latest Xcode 4.6, including iOS 6 autorotation fixes and the FIX_CATEGORY_BUG issue. Being happy is reserved for whenever I’ve added something nice to KoboldTouch.

Of course I updated cocos2d-iphone to version 2.1-rc0a (on first sight that version looks like being encoded in hexadecimal). Which meant I also had to update cocos2d-iphone-extension to whatever is the current development version - which must be somewhat above 0.21 but that’s hard to tell because there’s no reference of a version number anywhere.

Also updated Chipmunk (6.1.2) and obviously that had to be followed by updating Chimpunk (oh there it is again - my favorite typo today) SpaceManager v0.2.01.

Lastly Admob was playing hard to catch. And it has grown awfully huge, comes with several of Google’s other SDKs as well. Given the dwindling interest in ads by game developers I just pulled the plug and removed AdMob. You can still add it back in to your project according to Google’s instructions though.

That said, here’s the download link for Kobold2D v2.1. Here’s the link to the Release Notes.

I’ll make another update when cocos2d 2.1 is final. The next version is dated for “March” according to the Changelog, but that’s going to be another release candidate. I didn’t want to hold off on updating Kobold2D for the cocos2d 2.1 final version.

PS: There won’t be anymore updates to the Kobold2D v1.x branch.

Tagged with:  

Essential Cocos2D is now available for free!

On February 7, 2013, in idevblogaday, by Steffen Itterheim

The cocos2d-iphone reference documentation project dubbed Essential Cocos2D is now available for free. It is no longer bundled with KoboldTouch.

This is just one aspect of several upcoming changes I will be making to KoboldTouch over the next days. I removed Essential Cocos2D from the equation because after the first 3 months as well as the KoboldTouch survey it became clear that KoboldTouch should be all about KoboldTouch - both from my side & my motivation as well as what (potential) customers are interested in.

Instead of adding more hassle to the mix by turning it into a paid eBook project I decided it’s probably the best for everyone to give it away for free.

Essential Cocos2D caused a conflict of interest by taking time & energy away from developing KoboldTouch and its documentation. Now I’ll be using Essential Cocos2D as the container (and easily browsable one too) and inspiration for the in-depth Cocos2D articles I’ll continue to write infrequently for my iDevBlogADay posts.

www.koboldtouch.com

Continue reading »

Page 3 of 2712345...1020...Last »