Tutorial: Cocos2D Example – Whack A Mole Game

Ray Wenderlich has released an excellent set of iOS tutorials on how to create a whack-a-mole game using the open source iPhone game engine Cocos2D. I really like tutorials myself in which you develop something that could be built on and with some more work turned into a real product, and it looks like that is what Ray is trying to encourage with these tutorials.

In the tutorials Ray covers a lot of ground. He shows how to adjust for the increased resolution of the retina display on iPhone, and the different aspect ratio used on the iPad. How to draw the background, including placing the holes which will overlay above the background and the moles being whacked. How to animate the different moles, and how to use a property list to define the animation frames. How to set up the game logic, and touch code for interacting with the moles.  There’s quite a bit in there.

You can find the tutorials at:

How To Create A Mole Whacking Game with Cocos2D: Part 1/2
How To Create A Mole Whacking Game with Cocos2D: Part 2/2

For those that don’t know Ray has also been working on a Cocos2D book with Rod Strougo, the rough cut can be found here (you’ll need to pay to access the content, but you can see browse through the table of contents free). It is looking great so far.

New Category: Cocos2D Tutorials And Examples

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail

Leave a Reply

Your email address will not be published. Required fields are marked *