Archive for September 23rd, 2010

23
Sep

cocos2d Collection

So in case you missed it, cocos2d v0.99.5b3 is out today; big news is that the API has moved from pixels to points for RetinaDisplay support — but looks like there’s some issues with that on the iPad, check out the release thread for details on that and other immediate issues.

Long as we’re mentioning that, this is a good time to sort through the various interesting-looking cocos2d bits we’ve collected hither and yon the last while to add to the various posts about cocos2d related stuff we’ve done before. First off, on the physics side of things:

If you haven’t stumbled across VertexHelper for Box2D & Chipmunk Vertices yet it’s a pretty nifty tool you can find on github here and read about in another of those majestic Ray Wenderlich tutorials.

And Nick Vellios wrote a series on adding radial gravity to Box2D. (h/t: ManiacDev)

On the 3D side of things, if you’d like to mashup cocos2d with the SIO2 3D engine we’ve mentioned occasionally, like this game, check out the writeup here and cocos2d forum threads here and here.

Or if it’s UIKit that you’d like to do some mashups with, check out cocos2d and UIViewControllers and CCUIViewWrapper – wrapper for manipulating UIViews using Cocos2D for some particularly good tips.

Moving on to architecture, if you’d like your cocos2d project to be a bit more MVC-ish than conventional, the cocosMNC (“Model-Node-Controller”) superframework available on github will no doubt be of interest, as will the Subclass CCSprite vs Model Class. Best Practice? thread for various perspectives on how to approach same.

Other little snippets of possibly more than trivial interest:

CCTableViewSuite is a good start on UITableView-ish cocos2d functionality.

Fog of War Technique discusses how to implement same with acceptable performance.

How To Handle Double Taps is a good tip for handling, well, you know.

CCZSprite and HudLevelSprite address the issues with getting sprite z-ordering right.

Objective-C Flocking Behaviors has a cocos2d example. (h/t: @cocos2d)

Aaaaand once you’ve got all that implemented, and it’s just not working like you’d envisioned, check out Performance tips for Cocos2d for iPhone for some help with that.

Finally, for another recent roundup check out Getting Started with Cocos2d which has a bunch more references that might be of interest as well!

UPDATE:

Adding UIGestureRecognizer support in cocos2d (h/t: @wadevondoom)