Learn & Master

Cocos2D Game Development

            "Crack that Coconut!"

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?

Learn Cocos2D Game Development

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!

202 Responses to “Learn Game Development with Cocos2D”

  1. TomL says:

    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.

  2. Dill says:

    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.

Leave a Reply

Powered by WishList Member - Membership Site Software