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 'iphone'

Page 2 of 3

How To Build a Tower Defense Game for the iPhone – Part 1 – Creep Waves!

We made it! We’ve talked a little about design and have a fairly good idea of what the finish product will look like when we’re all done. Now we start the task of coding the thing. The first step for any tower defense game is the “creeps”. Creeps are the enemy characters that are invading your tower defense world and that you need to repel. So what are we going to do in this tutorial? Because this is just the first of a few, this is some of the items we’re going to cover:

  • How to make waypoint.
  • How to load up a tile based map and use objects from it instead of hardcoding them
  • How to create Creeps/Bad Guys/ Enemies you name it
  • How to make the move along our predetermined path
  • How to do smooth scrolling on the iPhone

Without those things the game will not be much of a tower defense game. Well, some of the items are just nice goodies, but we want them so we’re getting them in right away! So in this first installment I am going to going to show you how to have a basic enemy follow a predefined path on a tilemap, by following a series of waypoints. By the end of this series, you will have all the information to be well on your way to making the next great tower defense game.

Source code after the break!
Continue reading ‘How To Build a Tower Defense Game for the iPhone – Part 1 – Creep Waves!’

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

Building a Slide Image Game (Part 2 – With Solution)

Hi Everyone! We’re going to revisit the image sliding tutorial to add one additional feature. We are going to determine whether the puzzle has been solved or not. The task should be fairly straight forward so lets get started right away!

Source code after the break!
Continue reading ‘Building a Slide Image Game (Part 2 – With Solution)’

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

Building a Match 3 Type Game

So, we’ve set the ground work to start actually building a game with our menu, sprite, touch and animations tutorials using cocos2d. Now lets try something a little more adventurous – Lets actually create a simple “match 3″ game. What’s is a match 3 game, you may be asking… Well you’ve played them before I’m sure if you’ve ever played a flash game on the internet (The most famous of them being bejeweled). You can see the full game here – It’s free for the full game now! Drop Dead – Check it out now on itunes. The game play mechanic is very straight forward -

  1. You create tiles with different looks
  2. You randomly place those tiles in a 7×7 or 8×8 grid
  3. If three of the same objects line up either vertically or horizontally they all get removed from the grid
  4. All objects then fall to fill the gaps left by the removed tiles

Done.   Can’t we do it… Hell yeah we can… So lets ge started.

Source code after the break!
Continue reading ‘Building a Match 3 Type 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

How to Save the Game Settings in your iPhone game

If you have any kind of options or preferences menu, you want to make sure that any changes your user makes will carry over from one game session to the next. For example, if your user mutes the Music volume, it’s good practice for that to always be the case, no matter how many times they open or close the app, until he or she unmutes it. So – what’s the best way for saving this info?
Continue reading ‘How to Save the Game Settings in your iPhone 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

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

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





Switch to our mobile site