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!’
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.
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’