While Cocos2D is compatible with ARC, simply enabling ARC in the project’s Build Setting will throw several hundreds of errors in your face. Cocos2D doesn’t provide ARC-enabled project templates. Thus this tutorial about how to enable ARC in a newly created Cocos2D Xcode Project.

While none of these steps are overly difficult, you’ll notice there’s plenty of steps to perform. Unavoidably, and on the off chance you don’t already know, I’d like to recommend Kobold2D to you if you want to write ARC enabled Cocos2D apps. Because none of the steps below, really zero, zilch, nada, niente, keine are necessary to enable ARC in Kobold2D. That’s because it ships with 15 template projects all of which have ARC enabled out of the box. And Kobold2D 2.0 with cocos2d-iphone 2.0 is just around the corner.

Self-advertisment aside, these steps are tested with cocos2d-iphone v2.0 but should also work with cocos2d-iphone v1.1 – but admittedly I haven’t tested the process with the v1.1 version. If you find anything that’s not quite working with v1.1 please leave a comment. Preferably with the solution, that’ll be awesome!

UPDATE: I released a video version of this tutorial:

Continue reading »

LearnCocosTV 8: KobiOSsilator

On March 26, 2012, in LearnCocosTV, by Steffen Itterheim

I bought a Korg Kaossilator (more info on Wikipedia) and show what the device can do for you, music- and/or noise-wise.

I also explain the Q1 2012 iOS Device Sales statistics, the newly released Kobold2D v1.1 and v2.0 progress, and finally I got a surprise present: Mountain Lion. Not what you think, though.

• Korg Kaossilator
o Examples
• Kobold2D 1.1 released
o Kobold2D 2.0: orientation issues delaying release
• iDevBlogADay: iOS Device Sales Statistics Q1 2012
• 10 Golden Rules for Donate Buttons
o Mountain Lion gift

iPhone Quarterly Sales (Source: Wikipedia / Apple Quarterly Results)

With Apple’s blazing Q1 2012 quarterly results, which sees iPhone sales double (!) that of the previous Q4 2011 and last year’s Q1 quarter, it’s time to update my iOS Device sales statistics from July 2011.

Apple’s Quarterly Results Reports have one big flaw for those interested in per-device numbers: Apple only mentions how many iPhones, iPods and iPads they have sold in each quarter, but this includes all models. So you have to exclude the discontinued models as well as somehow determine (if only by guesstimating) how many iPod touch vs regular iPods, or how many iPhone 3G vs iPhone 3GS have been sold in that quarter.

I took the publicly available numbers and then used a reasonable guesstimate to split the device sales of two combined models in order to get a reasonably accurate estimate. I mainly wanted to determine how the gap is widening between the OpenGL ES 1.1 and OpenGL ES 2.0 models. This is particularly interesting for Cocos2D developers who may be wondering if it’s save to upgrade to Cocos2D 2.x or whether it’s still worthwhile to stick with Cocos2D v1.x to be able to deploy even to 1st and 2nd generation iOS devices.

Continue reading »

Justin Dike over at CartoonSmart.com created an awesome Starter Kit for creating Sling Shot games like Angry Birds, using cocos2d-iphone.

Click on the image to view the product page with more details:

I should mention that I get a commission fee for each CartoonSmart.com sale. In other words I highly appreciate every sale because it helps me to keep this website running and to continue improving Kobold2D.

Tagged with:  

LearnCocosTV 6: One Small Script for Man

On February 27, 2012, in LearnCocosTV, by Steffen Itterheim

In this episode of LearnCocosTV I demonstrate how to write and animate a Cocos2D scene with KoboldScript.

KoboldScript is more than just writing the same Cocos2D code but with a scripting language. Most other scripting language bindings for game engines simply translate the game engine’s C/C++/Objective-C API 1:1 (more or less) without introducing new concepts, adding more comfort by simplifying common tasks, or utilizing the powerful features of whatever the scripting language has to offer.

KoboldScript goes three steps further than that – one by tightly integrating the setup of scenes via defining the node properties in a tool-friendly tree structure (Lua table) that you can both write manually or create programmatically using Lua’s built-in features.

Two, by using Statemachines to drive game logic while also providing free Lua scripting via user-specified Lua callback functions. And three, by adding a (MVC-ish) component system with re-usable abilities and behaviors to all Cocos2D nodes.

Unfortunately I ran out of time at the end so I couldn’t even say goodbye. I hope you don’t mind. :)

Episode #6 – One Small Script for Man …

• KoboldScript Demonstration
o How to create Scenes with Sprites, etc
o How Abilities & Behaviors work
• iDevBlogADay: Asynchronous Texture Loading
o Cocos2D Webcam Viewer speedup

Cocos2D Webcam Viewer, Part 2: Asynchronous Texture Loading

On February 23, 2012, in idevblogaday, by Steffen Itterheim

I updated the Cocos2D Webcam Viewer project from a previous article to download a file from the web asynchronously, and then load its texture asynchronously as well. You can now switch between the two modes to see how asynchronous operations almost completely removed the pauses the app experiences in synchronous mode. Just tap the screen to switch modes.

To visualize the lag I added a constantly moving sprite at the bottom. This makes the lag easier to spot than a framerate counter. I also removed all error checking code from this article to make the code easier to read. As always you can find the Cocos2D Webcam Viewer source code with full error checking on the LearnCocos2D github repository.

Continue reading »

KoboldScript Koolness, Part 1

On February 18, 2012, in Kobold2D, by Steffen Itterheim

I thought I’d post a very early result of the KoboldScript scene setup. This scene was scripted entirely with KoboldScript with about 50 lines of code:

Below you’ll see the part of the Lua script that created this scene. In fact it’s not so much code as it is defining data, which behind the scenes calls the node functions like setPosition and setColor for you.

Continue reading »

Tagged with:  

LearnCocosTV 5: Pretty State Machine

On February 13, 2012, in LearnCocosTV, by Steffen Itterheim

KoboldScript is coming! KoboldScript brings Lua scripting to Cocos2D and Kobold2D, with Objective-C performance for the StateMachine part and faster-than-Wax performance for the runtime Lua functions.

More details and first looks at some early development scripts in this LearnCocosTV episode. I’ll have something more visual to show in 2-4 weeks.

Episode #5 – Pretty State Machine

• KoboldScript: Lua Scripting for Cocos2D & Kobold2D
o Poll: Which scripting language for Cocos2D?
o iDevBlogADay: Text Editors for Lua
• KoboldScript combines:
o Lua StateMachine generator (full ObjC performance)
o Runtime Lua functions (faster than Wax)

Continue reading »

Tagged with:  
Page 8 of 27« First...678910...20...Last »