Are you ready to learn to how to make iPhone games?
The iPhone Game Kit 4.0 — a Cocos2D tutorial on steroids — is now available for download. If you’re an existing customer, then by now you will have received your email with updated links to download all the updated code and art.
And what an update it is…
Better HD and Retina Support
One of the biggest improvements to the Kit is full HD support for the Quexlor RPG project. Here’s a few before and after screenshots to illustrate the difference. It helps to click the images to really get a feel for the enhancement:
You’ll notice that the before image looks pixellated. That’s because Quexlor was running in a scaled SD mode. The after image looks a lot more crisp. It is running in full HD with HD sprites, tilesets and magically HD TMX maps.
We also added some shadows to the trees for a more 3D feel.
HD TMX Maps
So how did the magical HD TMX map thing happen? It’s all thanks to some inspiration from WBTMXTool. This is a command-line tool that scales your TMX files manually. When you run your game, you include its category of CCTMXMapInfo which converts your HD map into points instead of pixels.
Our tack was to do the same thing automatically (no command-line tool). This leaves the existing SD TMX maps alone and automatically scales them up and uses high resolution tilesets when our custom CCTMXMapInfo category detects that the game is running in high-def.
HD Sprites
If you’ve used the iPhone Game Kit before, you’ll remember that it relies primarily on a lot of royalty-free artwork created by Reiner’s Tilesets. We did this so beginners to iPhone game development can easily create their own games with tons of artwork to start. The problem is that all the artwork is SD.
We discovered that it’s not that hard to make an HD sprite from an SD sprite, as long as you are kind of going for that cartoonish feel. We just double the image resolution with bicubic smoothing, apply a median blur, then sharpen:

Before. An SD sprite with hard edges.

After. The HD sprite with a smooth cartoonish feel.
Compressed PVR Support
Both Monster Checkers and Quexlor now use compressed PVR (.pvr.ccz) spritesheets for the fastest possible load times and smallest memory footprint. We’ve added a few paragraphs to the book about how to create your own PVR.CCZ spritesheets and what options to use.
Monster Checkers 2
Awhile ago we blogged about the new Monster Checkers codebase becoming available soon. Well, here it is. There’s tons of fun additions and music.

New Monster Checkers codebase
New Cocos2D Basics Chapter
We added a chapter to the book on the basics of Cocos2D. This chapter walks you through concepts of scenes, layers, sprites, touch control and actions. We’ve also included another example project called “SpriteDragger” to go along with the new book chapter.

New Chapter on Cocos2D Basics
The book’s chapter about HD and retina support “Lofty Resolutions” has also been thoroughly updated.
iOS 5 Compatible
We fixed one tiny iOS 5-related bug (the Quexlor project was missing the file “magic2.caf”) and updated the project files. The iPhone Game Kit is now fully iOS 5 compatible.
Please note that if you are running the iOS 5 simulator, you might get a few new warnings in the console. Both of these warnings you can safely ignore. One of them is about how “Applications are expected to have a root view controller at the end of application launch” and the other is a “Symbol not found: _CFXMLNodeGetInfoPtr” message. Ignore, ignore.
Includes Cocos2D 1.0.1
All the projects included in this version of the Kit include the latest stable version of Cocos2D: 1.0.1.
Better Memory Management
We took some steps to use autorelease as infrequently as we could. CCSprite, CCMenuItem, CCScene and CCLayer objects are all now alloced and released instead of using class methods which return an autoreleased object. This makes transitioning from scene to scene a much more memory-friendly operation. When the transition happens, the previous scene is completely freed from memory, giving the games a head start towards the blue ribbon in memory usage. You can watch the scenes deallocating in the console:

Scenes are cleaned up automatically
Zero Analyze Warnings
As always, you’ll get zero analyze warnings in the iPhone Game Kit’s projects when you perform a Product > Analyze build. (You might get a few in Cocos2D.)
Better Projects
Any classes that we have written which are meant to be reused in multiple projects are now prefixed with “KIT”. There’s KITApp which acts as a delegate between your game, Apple’s frameworks and Cocos2D. There’s KITCharacterProfile which loads all sprite sheets, sprite frames and sound effects for a character using a property list. There’s also KITSound which wraps the CocosDenshion sound engine with asynchronous loading in a handy singleton object.
All the projects are now self-contained, including all the code and art necessary to build the project within that project’s directory structure. There’s no more relative paths. So you can drag, drop, copy and paste an entire project without worrying about keeping directory structures intact.
Last, but certainly not least…
Full Source Code Reference Documentation
We wrote detailed comments, describing all the primary class interfaces included in the iPhone Game Kit. Then we used Doxygen to compile them into handy HTML source code references. You can now browse the entire class hierarchy of Quexlor or Monster Checkers, with all the information you need to understand the classes at a glance.

Detailed class and API reference.
Thanks
This iPhone Game Kit update is mostly thanks to all the helpful suggestions and feedback you all left in the survey earlier this year. To all of you, a huge thank you. We hope this updated iPhone Game Kit brightens your day and good luck on your quest to learn to make iPhone games.
Happy holidays everybody.