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 'objective-c'

How To Build a Tower Defense Game for the iPhone

We’ve been doing a lot of simple game mechanics and one of our favorite for a long time has been the tower defense game – So in an effort to do this right, since programming this will take some time, lets talk a little tower defense design and goals.

Tower Defense Description:

  • The enemy starts at one side of a map and travels along a path towards a destination ( usually on the opposite side of the map).
  • You create towers along these paths that fire on the enemy while they pass through. 
Attempt to survive wave after wave of stronger and stronger enemies by upgrading your towers with more powerful abilities.
  • You can either win the game by beating the final wave (usually 20 to 50 waves) or keep going till you lose and there by get bragging rights when you die at wave 97.
Learn Cocos2d - Tower Defense Tutorial for iPhone

A simple tower defense game tutorial for the iphone

There is not a “casual game” that better defines the word casual – The player makes a simple placement of a towers and make small upgrades while the battle unfolds. Who hasn’t played a tower defense game and lost on the 48th level of a 50 level game, because you didn’t plan for multiple types of enemies to attack at the same time.  You can literally spend hours revising tower defense games to see if you can “beat” the game faster, get the most money or just win with the fewest towers.

Continue reading ‘How To Build a Tower Defense Game for the iPhone’

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