Welcome to iPhoneGameTutorials.com! Check out our Tutorials page for a list of everything we've written
so far, and drop by the Forums to let us know what you would like to see written about on the site.

Monthly Archive for September, 2010

Building a Slide Image Game

It’s been a week since our last tutorial and in this new tutorial, we’re going to actually tackle a game – A slider game… You know the type of game I’m talking about, the players job is to put a game that is jumbled up, back together again. The great thing about games of this type is that we can use this as our first foray into the world of tile based games.

So what do we need to create this wonderful type of game? Below are a list of steps to make your own tile based slider game:

  1. Create a “Tile” class that has a sprite, a position and a value
  2. Create a manager type class that will create all the tiles and keep track of them
  3. Add touch components that will allow the user to swap tile locations
  4. Add additional image randomizations so there is more variety in the game

That’s it… Sounds simple when written out, huh? Well, we’re going to go through it and show you that it can be simple.

Source Code after the break!
Continue reading ‘Building a Slide Image Game’

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Cocos2d Sprite Tutorial Part 3

So in Part 2 we introduced an animated dragon that had 8 directions of movement and was completely controllable via touching the screen. Isn’t cocos2d awesome! Well today we’re going to do a little more, today we’re going to create some villagers – tons of them in fact. We’ll use the information we’ve gotten so far including loading sprites from a sprite sheet and setting up animations.

Source Code after the break!
Continue reading ‘Cocos2d Sprite Tutorial Part 3′

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Apple’s App Store Review New Guidelines

So unless you’ve lived in a bubble you’ve heard that Apple has not only partially changed its policy on flash, but also posted its guidelines for getting into the app store. Obviously if the wall street journal is right then Apple wants to make more developers happy… Just don’t get too excited just yet.
Continue reading ‘Apple’s App Store Review New Guidelines’

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Cocos2d Sprite Tutorial Part 2

So last we left, we left our dragon in the middle of a field hovering above the landscape… However, 90% of the animations we worked so hard to put in weren’t even being used and that is just a shame! Well, that changes now! We’ll now add in additional touch controls for the first time to handle user input and have the dragon fly all over the screen and picking a new animation based on the direction and terrorizing the country with your own flying dragon.

Source code after the break!
Continue reading ‘Cocos2d Sprite Tutorial Part 2′

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Cocos2d Sprite Tutorial

Welcome back friends – Today we’ll be surmounting the world of sprites in Cocos2d. Not as hard as you might imagine and I’m going to prove it to you. First, there are a ton of ways to show an image on the screen… In fact you’ve seen one way when we were playing around with images in part 3 of the menu tutorial.

So what are we going to learn today?  We’re going to learn everything we can about “CCSprite”, “CCSpriteSheets”, “CCSpriteFrame” as well as “Texture2d” and “CCTextureCache”! By the end of this tutorial, we’ll have a dragon flying over a simple background terrain moving to the location the user touched. Pretty great huh?

Source code after the break!
Continue reading ‘Cocos2d Sprite Tutorial’

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Cocos2d Menu Tutorial – Part 3

So we’ve done a bunch with menus already, what more can we do you ask? Patience my friend! Today we’re going to touch the area of menu item images! How excited are we? Pretty damn excited I can tell you…

To be honest you can ony really get so far without including graphics – People just aren’t incredibly wow’d by black on white text including images… You really need something to stand out in that app store which is why this lesson is one of the most important.

Source code after the break!
Continue reading ‘Cocos2d Menu Tutorial – Part 3′

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Cocos2d Menu Tutorial – Part 2

If you haven’t hit up the part one of the series, I recommend you do so before moving on to this one since we’ll be building off of information that came up in part one…

Today, we’re going to be adding to the previous tutorial and getting our feed wet with animations and transitions. This will seem like a breeze from the last tutorial, but there is a lot to this so lets jump right in shall we!

Source code after the break!
Continue reading ‘Cocos2d Menu Tutorial – Part 2′

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Cocos2d Menu Tutorial

So I imagine you’re already coming from the “Getting Started with Cocos2d” tutorial previously posted here, therefore, I’m assuming you’re all squared away with getting the iPhone sdk and XCode setup. For those who might just need a refresher course, the instructions are fairly straightforward to get started with Cocos2d.

Today, we’re going to tackle the wonderful world of menus. You can’t make a game without menus and Cocos2d makes it super easy to do it. But even before we begin we need to make sure we have a system in place so that our game can easily expand so we’re going to also create a Scene Manager.

Source code after the break!
Continue reading ‘Cocos2d Menu Tutorial’

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

Getting Started with Cocos2d

Cocos2D for iPhone is a great open source framework that makes it easy to make some very impressive 2d games with much less effort than having to know OpenGL directly or rely on a third party system that might have performance issues or be unnecessarily bloated.   From the official cocos2d for iphone website:

Cocos2D for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications. It is based on the cocos2d design: it uses the same concepts, but instead of using python it uses Objective-C.”

Many of the most complex features are done for you, but like any open source software you can make changes as required.  I however, doubt you will need to do many modifications on your own given that it’s very easy to subclass and handle drawing yourself as you become more experienced.  Using Cocos2d is really one of the best ways to get your feet wet with OpenGL programming and learning Objective-C. HOWEVER, it is a programming language and that means you will need to understand the fundamental concepts of programming.
Continue reading ‘Getting Started with Cocos2d’

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter

iPhone SDK Getting Started

The current SDK version as of this writing is 4.0 and Apple is looking to only support up to 3.2 of the operating system, but it’s always good to have fall backs for devices with older operating systems (I still have an iTouch with 3.1.3).  An older computer of mine had only version 10.5.8 so I was initially prevented from developing iPhone games because I was missing snow leopard.  Apple still allows you to download older versions of XCode though, so pick the version that your operating system supports.
Continue reading ‘iPhone SDK Getting Started’

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter





Switch to our mobile site