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.

Archive for the 'Intermediate' Category

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

Cocos2d Tutorial – Using In-App Purchases

In App Purchase Sample
*** NOTE: The in-app purchase items that are included in the sample code will only work if you are accessing the US app store. If you are outside of the US, you will have to create your own application and in-app purchase items, and overwrite the ID’s that we specify in the code. Thanks to reader Ben Rad for pointing out that it also will not work with jailbroken iOS devices! ***
Hey everyone – we’re in the midst of a project where we’ve just had to implement In-App purchases, so we figured we would get this quick little tidbit of info out to you all. What we’ve put together is a quick sample app based off of Ray Wenderlich’s tutorial. Ray’s tutorial was based off of UIViews, and we here at iPhone Game Tutorials love Cocos2d (download here!) so we ported this over. Hopefully this helps someone make some big bucks!

Source after the break!

Continue reading ‘Cocos2d Tutorial – Using In-App Purchases’

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

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





Switch to our mobile site