When I asked on Twitter what kind of chapter you’d like to see in , I got some great responses! The most votes were for more complex physics examples, all other suggestions were all over the place. Saving and loading, optimizations and organizing bigger games, audio programming and Cocos3D. I think they would all deserve a chapter of their own, and in fact I’ll get you started with ObjectAL and Cocos3D in the chapter about Kobold2D.
But after some research I realized that one of the most frequent issues with an apparent lack in good answers are about integrating Cocoa Touch (UIKit) in a Cocos2D application. Or vice versa, adding Cocos2D to a Cocoa Touch application. There are many things to consider, and it’s easy to run into problems. This topic is especially persistant because on the one hand there are a lot of Cocoa Touch programmers who are starting to use Cocos2D, whereas there are also many Cocos2D users who know little of Cocoa Touch - and both want to use the best of both worlds.
Here’s a preliminary list of topics I’d like to get into:
- RootViewController explained
- Cocoa Touch views in a Cocos2D app (eg In-App Mail)
- Starting & stopping Cocos2D in a Cocoa Touch app
- Properly handling autorotation
- Performance considerations
- Adding iAd banners
If you have a suggestion that is not on this list feel free to add it in a comment!
Xcode Tutorial Lesson: SpaceManager + cocos2d FAQ updates
I made a few additions to the Xcode Tutorial and the cocos2d FAQ which are based on user questions and concerns.
Xcode Project Tutorial: How to integrate Chipmunk SpaceManager
How to update the cocos2d-iphone code in a project created with a cocos2d Project Template? (Theory & Advice)
How to fix common Box2d compile errors? (must compile using C++)
How to fix common Chipmunk compile errors? (does not compile with C++ code)
How to draw an endlessly repeating Parallax Background? (very simple, very effective)
On Searching the Tutorial & FAQs
I’m still trying to get the search function on the Tutorial and FAQ pages fixed. Currently it works for the Xcode Tutorial only but other search result links may simply show an Error. I’ll try to get this fixed as fast as i can and i’m getting very helpful support from the folks at ScreenSteps Live so i’m hopeful.
Please also note that the search box in the navigation panel doesn’t search the FAQ and Tutorials, just the blog and pages.
Xcode Project Tutorial Updates: Box2d & Template
If you followed my Xcode Project Tutorial or received it after signing up for my Newsletter you may have noticed that it would not compile if you added #import “box2d.h” to any of your classes. I investigated and thanks to your comments the problem was easy to fix. I wrote a Tutorial lesson detailing box2d integration issues and how to solve them.
In addition, Tim Soliday who blogs at FatFingerStudios.com went through the effort of creating a “real” Xcode Template from my Tutorial project. By “real” i mean an Xcode Template that will be added to Xcode’s “File -> New Project” list of applications so that you can choose to start with a “cocos2d Application from there. This has also been requested by readers. I added another Tutorial lesson which describes how to install Tim’s Xcode Template.
I will add Tim’s Xcode Template to the Newsletter welcome mail in a couple minutes so new Newsletter subscribers will receive it automatically! If you have already signed up for my Newsletter you’ll have it in your inbox shortly, you do not have to sign up again!
The new Projectfiles you’ll receive also contain the box2d fixes and include my free source code collection and a number of other changes. Most notably the addition of License files and folder structure that go along with it which help me and my customers to differentiate between my base source code that is only licensed to the customer vs. source code that is later fully owned by my customers. Feel free to disregard or delete these License files if you have no use for them.