Get Updates By E-mail 

Article Written By:
Johann Dowa

Cocos2D Tutorial And Example Page


Cocos2D has established itself as the most popular 2D game engine on the iOS platform using Objective-C.  The popularity of the game engine has spawned a number of ports with the most well known port being Cocos2D-X allowing developers to create apps from a single C++ code base working on the iOS, Android, Marmalade (Airplay) SDK, Bada, and Blackberry platforms.

Unless otherwise stated the tutorials and source code examples on this page use the Cocos2D-iPhone Objective-C game engine.

This list has just been started, and it will be awhile before all of the many different tutorials and examples are added as they must be rechecked. Be sure to come back as there will be regular updates until all the resources are added.

If you’ve created a Cocos2D game tutorial, source code example, Cocos2D library or tool that you would like added to this list then please submit it here.

Updated 5/31/2012

Here are the current resources:

Castle Hassle – A highly polished Cocos2D/Box2D open source example of a castle destruction game available in the app store.

CocosMotion – An example project demonstrating the use of the Cocos2D iPhone SDK with the RubyMotion (Ruby) programming project.

Soft Body Physics With Box2D and Cocos2D – A very in depth guide to understand the basics of Box2D soft body physics in which you’ll create a very slick bouncing ball.

How To Integrate The Finite State Machine Compiler With Cocos2DA tutorial on using the finite state machine compiler (a tool that generates Objective-C code from a language specifically for state machine’s) to create an AI controlled Cocos2D character.

Creating Custom Effects With Shaders in Cocos2D v2a tutorial showing how to take advantage of the upgrade to OpenGL ES 2.0 in Cocos2D v2.x to create cool effects in Cocos2D v2.0.

Flash2Cocos2D – A project including libraries allowing you to export Flash animations and use those libraries within Cocos2D iPhone. (Added 3/21/2012)

Cocos2D Builder – Open source drag and drop editor for laying out various Cocos2D Nodes including sprites, particles and more.  Now supports Cocos2D v2. (homepage) (source code) (Added 3/16/2012)

CCNode-SFGestureRecognizers – Code for easily adding gesture recognizers into Cocos2D games – is a category so you don’t need to modify the Cocos2D core code.  Works with Cocos2D v1.0 and v2.0. (Added 3/15/2012)

Creating Fading Particles – An example demonstrating how to create particles in Cocos2D that can fade in and out.

Modal Alerts Tutorial – A tutorial and source code example providing an easy to modify class for creating  modal alerts easily within Cocos2D. (3/5/2012)

Add Support For The  iCade Controller In Cocos2D Games – Tutorial showing how to add support in Cocos2D games for the popular bluetooth protocol controlled iCade controller. (2/20/2012)

Integrate Cocos2D v2.0 With Storyboards – A guide using the new view design of Cocos2D 2.0 demonstrating how to use Cocos2D 2.0 and storyboards (2/15/2012)

Color Picker Extension Designed Specifically For The iPad – An example showing how to create a color picker control specifically designed for touch devices that you can drop into your Cocos2D apps. (1/18/2012)

Frogger Recreation – A source code example demonstrating how to recreate frogger on the iOS platform using Cocos2D. (1/4/2012)

Particle Engine Class Using A Sequence Of Images – A source code example showing how to use a specific sequence (ie. the letters of alphabet) of images as your particle stream. (1/3/2012)

Ninja Finger Slice Example – A source code example showing how to recreate the finger slice made famous in games such as Fruit Slice in Cocos2D-iPhone and Cocos2D-X.  (Cocos2D Source) (Cocos2D-X Source) (1/3/2012)

Fast Pixel Perfect Collisions – A tutorial with source code demonstrating a technique for performing fast pixel perfect collisions in Cocos2d utilizing image masks.  (12/15/2011)

Thanks for reading – be sure to come back as more Cocos2D tutorials and examples are being added.