By
Walter Reid | Published on
April 11, 2011 in
Advanced, Cocos2d and Tower Defense.
Tags: ccmoveto, CCSprite, cocos2d, Download, game source code, iphone, map, mapeditor, smooth scrolling, source, source code, tile, tower defense game, tower defense games, tutorial, Tutorials.
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!’
By
Walter Reid | Published on
March 17, 2011 in
Cocos2d, Intermediate and Slide Image.
Tags: CCLabel, CCSprite, cocos2d, Download, game, getChildByTag, iphone, puzzle, slide image, source, source code, tutorial, Tutorials.
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)’
By
Walter Reid | Published on
March 3, 2011 in
Cocos2d, Intermediate and Match 3.
Tags: actionWithTarget, CCDirector, ccTouchesBegan, Cocos, Download, full game, game source, iphone, iTouch, locationInView, sharedDirector, slide image, source code, tutorial, Tutorials.
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 -
- You create tiles with different looks
- You randomly place those tiles in a 7×7 or 8×8 grid
- If three of the same objects line up either vertically or horizontally they all get removed from the grid
- 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’
By
Walter Reid | Published on
February 18, 2011 in
Cocos2d, Match 3 and News.
Tags: class, complete game, Dead, dead game, DropDeadIPhone, game, game concept, game overview, great game, Halloween, impending doom, iphone, level music, loading screen, screen grabs, story mode, tutorial, Tutorials, view, zombie apocalypse, Zombies.
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!
By
Walter Reid | Published on
September 23, 2010 in
Cocos2d, Intermediate and Slide Image.
Tags: ccaction, CCDirector, ccmoveto, CCSpriteFrame, cocos2d, code, Download, Example, game, iphone, slide image, source code, sprites, tile based games, tiles, tutorial, Tutorials.
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:
- Create a “Tile” class that has a sprite, a position and a value
- Create a manager type class that will create all the tiles and keep track of them
- Add touch components that will allow the user to swap tile locations
- 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’
By
Walter Reid | Published on
September 14, 2010 in
Beginner, Cocos2d and Getting Started.
Tags: addChild, animate, ccaction, CCAnimate, CCDirector, ccmoveto, CCSpriteFrame, CCSpriteFrameCache, CCSpriteSheet, Example, game, information, iphone, PlayLayer, runaction, SceneManager, source, source code, sprites, spriteSheetWithTexture, spriteWithFile, stopaction, Terrain, Tutorials.
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′
The tutorials on iPhoneGameTutorials.com may contain mistakes, poor commenting and are meant to only be another resource in the arsenal of the iPhone game developer. There are books that we recommend on the site and we highly recommend you pick up a few, however, each programmers learning behavior is different therefore YMMV (Your milage may vary). Still you should pick up a few anyway…
Credit is given when possible – This is my homage to Jeff “NeHe” Molofeeone who’s site (nehe.gamedev.net) was one of the first opengl resources I used in my time and still a great resource.
We’ve organized our tutorials by both the game mechanic and the programming knowledge level required to pick it up. Click the links below to jump to a specific section:
Getting Started
Match 3
Slide Image
Tower Defense
RPG
Beginner
Intermediate
Advanced
Cocos2d
Getting Started
Match 3
Slide Image
Tower Defense
RPG
Beginner
Intermediate
Advanced
Cocos2d
Unity Tutorials:
Coming Soon
Torque 2d Tutorials:
Coming Soon
It’s up to you to take what you have learned from this site and apply it to projects of your own. Experiment with the code, read lots of books and ask questions in the forum or email us directly – Did I mention experiment with the code? Seriously it’s that important. We will also supply a plethora of very useful links that we’ve found helpful in our travels. Most of these sites are run by talented individuals that not only know their iphone development, they also program very well. Please keep all of this in mind while browsing my site. I hope you enjoy what we have to offer!
The site iPhone Game Tutorials came about like most things come about out of a need for a place where people can get a jump start into the iPhone game business. The internet is a big place, but it can sometimes feel a little more intimidating when you’re not sure what the right question is moving forward. Trust me…you need to have the right questions!
So this is where we stand – we here over at iphonegametutorials.com feel that we can hopefully answer a few of those questions, or at least put people on the right track.
- What do I need to get started in iPhone game development?
- What development framework should i use? Unity 3d? Cocos2d?
- How do I move a ball on the screen? How do I make a score counter? How do I use multi-touch? Accelerometer?!?!?!
These questions and more are the questions we hope to answer and along the way maybe make some good friends
So please, download the tutorials or visit our knowledgeable iphone game development forums and ask us a question – maybe even answer one or two while you’re at it. We want to give people the right start and hopefully make some great games together in the process.
Sincerely,
MajorTom (aka Walter)
http://www.iphonegametutorials.com
By
iPhone Game Tutor | Published on
August 31, 2010 in
News.
Tags: developer, Development, game, iPad, iphone, iTouch, knowledge, programmer, transition, tutorial, Tutorials.
Welcome one and all to the first post of this ambitious endeavor to bring game development knowledge to the iPhone. We’ll be showing different ways to create games on the iphone and hopefully give YOU the developer the best tools to make the next kick ass game.
Continue reading ‘First Post – iPhone Game Tutorials’
Recent Comments