Learn to Make iPhone Games with the iPhone Game Kit 4.0

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:

The iOS RPG game Quexlor before HD support

Before. Click for HD 960×640 version.

The iPhone RPG game Quexlor running in full HD mode

After! Click for HD 960×640 version.

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:

An SD sprite

Before. An SD sprite with hard edges.

An HD sprite

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 added to the iPhone Game Kit

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 deallocating automatically

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.

Source code API reference and class hierarchy

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.

-->

Featured Posts


Hero Bash: the party moba!

iOS 7 + Cocos2d 2.1 Update

Making Cross-Platform iPhone & Android Games – Don’t Get Left Behind! (Part 3)

Recent Posts


Tuning the Mind

From Programmer To Artist 10 of 10 – The Beginning

From Programmer To Artist 9 of 10 – Animation

The Ultimate Cocos2d-x Platformer Engine

A cross-platform, parallaxing game engine based on cocos2dx. Includes procedural level generation, scripting, dynamic texturing, realtime multiplayer, virtual economy (in-app purchase) and all the basics like moving platforms, boxes, slopes, water, ladders and artificial intelligence. Write your game code in C++ and level scripts in Javascript. Games built with this kit can be deployed to iOS, Mac, Windows, Android and any of the other platforms supported by cocos2d-x.
More Info...


Action-RPG Engine Code & Tutorial

Create your own RPG, RTS, action or adventure game with this source kit. Learn how to manage tilemaps, characters, AI and more. This kit includes a flexible RPG engine built on cocos2d iphone (now called cocos2d swift), along with a sample RPG project called Quexlor Lite. Also included is a PDF ebook tutorial and bonus royalty-free art package. Written in Objective C, games built with this kit can be deployed to iPhone, iPad and iPod Touch.
More Info...


iPhone Game Creation for Beginners

This game source kit is a hands-on introduction to making games for the absolute beginner. No programming experience is required. The included PDF book walks you through all the basics of how to code with Objective C and will familiarize you with the tools you need to develop an iPhone game. It includes source code and Xcode project files to a simple checkers game built with cocos2d iphone (now cocos2d swift). Also included is documentation, a game template project, support and a bonus artwork package to start your own creation. Games built with this kit can be deployed to iPhone, iPad and iPod Touch.
More Info...