Learn Game Development with Cocos2D
The Cocos2D for iPhone game engine is the premier 2D game engine for iOS and Mac OS X 2D game developers. It’s no secret that sometimes it can be a tough nut to crack. I’m Steffen, book author, blogger, game developer and nutcracker.
What is it that you want to know?
- Could Cocos2D be any easier?
It certainly can be, with Kobold2D and KoboldTouch! Without it, you’re hardcore. - Where can I find more advanced Cocos2D tutorials?
Read my iDevBlogADay articles, most of them Cocos2D tutorials on advanced subjects. - Is there source code for that?
Of course, it’s all in the LearnCocos2D github repository. - What if I like to hear your voice?
Uhm, if you don’t mind broken accents and the occasional incoherent rambling then listen to the Cocos2D Podcast with me and Mohammad Azam. (iTunes) - Where can I watch and learn about Cocos2D?
Check out the featured channels on the LearnCocos2D Youtube Channel and view my LearnCocosTV Show & Tell progress reports. - Can I get an answer from you personally?
Certainly! But due to the amount of questions I get I’m limiting it to the KoboldTouch member helpdesk and Cocos2D related questions on Stackoverflow.com. - Where can I find more tutorializing Cocos2D devs like you?
Here’s a quick list: Ray Wenderlich, Mohammad Azam, Alex Curylo, Johann Döwa, Bucky Roberts, iPhoneGameTutorials and many more. - I wouldn’t mind spending a few $$$ for code and education, but where?
Try my Line-Drawing Starterkit source code, my Learn Cocos2D book, the various Affiliate Products I help to sell and of course KoboldTouch with the Essential Cocos2D reference documentation. - What’s your affiliation with Cocos2D?
Other than being an avid Cocos2D user, fan and critic: none. - Can I hire you?
Nope, sorry. I have my hands full working full time on my own projects (see above). I’m still waiting for that clone I ordered …
Connect with me!
Join Cocos2D Central and start a discussion. That’s the best way to reach me. I also answer questions on StackOverflow.com.
You should also subscribe to my newsletter to receive updates and never miss anything important.

You should definitely follow me on Twitter if you use Twitter. If you don’t, now would be a good time to start!









I got 2 editions of your book now, but how to best program for both OSX and iOS is still unclear. I reckon the only real difference if I program the game for both platforms would be that I need to handle the user input in a different way that iOS only. In the examples in your book you have different classes all take user input, by making them a delegate of the “TouchDelegate”. But doing it this way would cause a lot of code to be rewritten for the OSX version. The best way as I see it, is to have two separate classes handling all the input for both platforms. But I have not been able to find any good examples how this is best done, are you aware of any?
Certainly. There’s Kobold2D which wraps input behind KKInput, which in turn is driven by concrete classes like KKInputKeyboard etc. Depending on the platform the concrete classes may be nil so any calls to keyboard on iOS returns default values (ie no key is pressed). That makes it easier to write cross-platform code because there’s no need to litter project’s code with #ifdef.
Hi Steffen,
thanks for your contributions to cocos2d. It has made a number of things a lot simpler and understandable for some of us. Recently, I posted a question on stackoverflow (http://stackoverflow.com/questions/16101596/making-a-box2d-body-move-in-a-sine-wave-type-motion) which you commented on. I am trying to use the approach you recommended but I’ve hit the wall. I am not even sure how to set the gravity scale for a range. I’ve been at it for quite a while, I would appreciate it if you could explain your solution a bit further for me. Thanks.