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?

  • Could Cocos2D be any easier?
    It certainly can be, with Kobold2D! 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 bi-weekly LearnCocosTV Show & Tell progress report.
  • Can I get an answer from you personally?
    Certainly! You can get in touch with me on the Cocos2D Central forum or by asking a Cocos2D/Kobold2D question 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 and the various Affiliate Products I help to sell.
  • How can I support you?
    Either buy any of my products because Learn Cocos2D and Kobold2D are my livelihood, or contribute to Kobold2D with your time, feedback and source code.
  • What’s your affiliation with Cocos2D?
    Other than being a Cocos2D user, fan and critic: none.
  • Can I hire you?
    Nope, sorry. I’ve converted to business ownership and got my hands full. Still waiting for that clone I ordered …

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 could also subscribe to my Newsletter to receive occassional updates and never miss anything important. I rarely send out a newsletter at all, only if it’s really important news.


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

169 Responses to “Learn Game Development with Cocos2D”

  1. Qpido says:

    Great book so far, enjoyable read. I have the 2nd version, are you going to be releasing a third on soon with updates like ARC and cocos2d-iphone 2.0beta?

    Thanks!

    Q~

    • Yes, I’m currently working on the 3rd edition. The 3rd edition discusses cocos2d 2.0, uses ARC for all projects, and is compatible with Kobold2D. It’ll be out late July or August.

      • Peyo says:

        I’m about to start “training myself” with Cocos2D. I opted for a Kobold2D set-up for obvious reasons.

        Should I wait until Kobold2D v2 is out which can’t be too far away ? And for issue 3 of your book by the way to get the right instructions ?

        Or will it be easy to upgrade when it’s out ?

        Many thanks in advance

        • Kobold2D v2 should be out soon. The 3rd edition is planned for July but could be August.
          Upgrading from cocos2d v1.x to v2.x can be a simple or complex task. It depends on how big the project is and how much it uses parts of the API that has changed in v2.

          • Peyo says:

            Thanks for your reply Steffen. Until August I reckon I only have time for learning, so I won’t have projects to upgrade, just my brain/understanding will need to adjust. So I’ll install Kobold2D v2 and start as soon as it is available, and get the book as soon as it is out (will use the tutorials and forum to start with). Thanks again.

  2. Abhinav says:

    Hi Steffen,

    Just wanted to drop a thank you note for creating GKHelper. Very neat and useful. Thanks!

    Best
    Abhinav

  3. Hey, I’m just starting out with cocos2d and extremely confused/unable to find good resources online. I was thinking about getting your book but with version 3 coming out soon would it be better for me to wait for that? I don’t really know much about developing without ARC which has been the hardest part of learning cocos2d.

    • I believe it’ll be well worth the wait. It should be out in about 4-6 weeks. It’ll be the first cocos2d book to cover cocos2d 2.0 and ARC (and the text & code are compatible with Kobold2D 2.0).

      • Thanks for the response! I think I will wait then. The non-arc stuff is what confuses me the most because I just started learning iOS and arc is the norm for me with a Java background. It’s hard to get started with cocos2d when all the templates they give you are non-arc and I can’t figure out how to load in a view in an arc project. As for Kobold2D I’m really interested in that but is it better to know cocos2d first? I never really found any information on Kobold2D that explained that.

        • Absolutely, Kobold2D is more or less a wrapper around cocos2d. Give or take a few details (startup specifically) you can use the same code from existing cocos2d tutorials.

          Also search my blog for ARC, I’ve got a few tutorials on ARC and how to enable ARC in a regular cocos2d project (also described in the book, just much better explanation thanks to copy editing and tech reviewers).

  4. Sunny says:

    Here’s a blogspot I made, and I will be posting tutorials very frequently. I already have 4 up in about 2 days!

    http://learning-cocos2d.blogspot.com/?view=sidebar

  5. AD says:

    Better documentation on how to integrate UI components like Table Views, Sliders, input gadgets, etc with cocos2d — I still don’t know how to put CCSprites or nodes onto a tableview.

    Thanks

  6. Rick G says:

    Hi Steffen,

    I have a couple questions for you… first off, would it be hard to take your new book (Learn Cocos2d) and apply most (all) that info to a Mac cocos2d project? Secondly, how hard (or even possible) is it to take a game written for Mac and/or iOS and port it to desktop PC and/or xna type thing for Xbox distribution?

    Thanks… great stuff btw.

    • You can build Mac apps with almost the same code. In Cocos2D you’ll have to setup an extra project, in Kobold2D you already get both iOS and Mac as targets in most template projects. The main API differences are when it comes to input, Kobold2D makes that easier with KKInput.

      Porting a game written in Objective-C with cocos2d-iphone to another platform is hard work. You have to consider two things: the engine, and the programming language. While Cocos2D provides the same concepts and to some extend also the same or very similar API across platforms, only cocos2d-x and cocos2d-iphone are relatively complete. There’s a cocos2d for XNA but I don’t know how mature it is, and I haven’t heard users talking much about it.

      Then there’s the programming language. Obviously you’ll have to port the Objective-C code, in the case of XNA that means C#. While the structure of the program can remain fairly intact because both languages are object-oriented, it’s a ton of tedious, boring work to transcribe each Objective-C class to a corresponding C# class. It’s also a difficult process, where the goal is *not* to convert all the code and then see if it runs. There will be problems and they will be hard to track down. Instead you’ll have to convert the very basics first, starting with an empty screen. Then slowly transcribing more and more classes and frequently checking if they run as intended. There are some tools that help in converting source code between programming languages, but it’s nowhere near flipping a switch. The services that promise to port existing apps easily, they weren’t made for games. They’re slowly catching up, but there will always be a significant performance penalty with those services.

      My recommendation for cross-platform development is to ignore it. Focus on one platform. Finish the game, release it. If you got a hit, you can start thinking about porting the game. If the game was so successful that you became a little famous for it and have a fanbase, you can consider developing your next game cross-platform from the start. But first, you have to have that one hit app on whichever platform before it is sensible wasting any time thinking about cross-platform development. It’s a little different for contract programmers, and small studios with enough finances to begin with, but if in doubt I’d still stick to one platform first.

Leave a Reply

Powered by WishList Member - Membership Site Software