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.

Tag Archive for 'class'

RPG Style Game for the iPhone – Part 2: Tiled Maps

Update:  Made some modifications to the source code – changed the title music (Hope you enjoy a remix of Dragon Warrior) and expanded the map to give a better idea of how you can use the space.  Also, I added grid lines to the tiles so it didn’t looks so much like a painting.  More parts to come!

It’s been a while since part 1 – we know from your comments that it’s not your favorite thing in the world (it’s not ours either) but we’re gonna try to get going again!

That being said, if you haven’t read part 1 of the tutorial, or the intro describing what we’re working towards, now’s your chance to play catch-up before plunging forward into the next piece of unknown – tile based maps using Tiled!

As will be the case for the rest of the tutorial, we’re using the Cocos2D framework for game development, which already includes support for the TMX file format (we’ll get to that later – just know that it makes our lives easier!). To build the map, we’re going to be using Tiled Qt, a fantastic piece of software that makes creating maps a piece of cake!

Source code after the break!
Continue reading ‘RPG Style Game for the iPhone – Part 2: Tiled Maps’

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

Drop Dead – Match 3 Game for the IPhone

We put this game together during Halloween last year, but who’s kidding who, Zombies work whatever time of year it is! It’s called Drop Dead – Check it out now on itunes

What makes this even better – Over the next few weeks, we’ll be posting snippets of the complete game so you can make one of these games yourself!  So stay tuned and in the meantime, if you want to support the blog, pick up the game!

The first thing you might notice when playing the game, looking at the screen grabs, or watching ourDrop Dead YouTube video is that it has the basis in some of the tutorials we have already presented. The match 3 game concept is a great game mechanic and doesn’t take too much time to put together.

The story is this: “In Drop Dead it’s up to you to help our confused hero escape the zombie apocalypse. Match blocks to gain time and ultimately escape from your hungry pursuers. Playing through Story Mode will unlock levels in Endless Hoards mode and Impending Doom mode for hours of re-playability!”

For those who don’t have the spare change – Here is the light version of Drop Dead

Some of the great concepts that we’ll be going over in future tutorials will be these - Drop Dead Game Overview:

  • SplashScreen
  • Loading Screen
  • Menu Page
  • Option Page (w/ slide bars)
  • Mission Page
  • Game (match 3 style game w/ powerups for getting multiple combos)
  • Save States with each level unlocked
  • Saved Scores (top score on each level)
  • Music and Zombie Sound bites

We hope you love the game and keep focus on this blog… We’re gonna be showing some great stuff!

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 Game Development – Getting Started

So you want to build a game and don’t know where to start. This is a very common issue that EVERYONE experiences when they start.  The answer is: “It depends.” Seriously, don’t go away, let me explain…

Torque vs Unity

Unity vs Cocos2d

Everyone has an opinion and all the frameworks have their plusses and minuses.   Continue reading ‘iPhone Game Development – 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