Forums

ForumsProgramming Forum

Tower defense tutorial

Posted Feb 15, '12 at 10:06am

krisnaisawesome

krisnaisawesome

16 posts

can any one give a tutorial about making a tower defense game?

 

Posted Feb 22, '12 at 3:30am

ExplosionsHurt

ExplosionsHurt

262 posts

Making a tower defense game is a very different experience depending on what game creation software you're using.

However, usually the general premise is the same. You've got enemies who walk on a preset path at a certain speed. You would use Pythagoras Theorem to figure out the distance between towers and the enemies.

You would also need a health system for each enemy and other stuff as well.

Unfortunately I cannot give you detailed information unless you tell me what game creation software you're using.

 

Posted Feb 24, '12 at 3:52pm

macfan1

macfan1

442 posts

Doesn't this go in game walkthroughs?

 

Posted Feb 24, '12 at 4:14pm

master565

master565

4,250 posts

However, usually the general premise is the same. You've got enemies who walk on a preset path at a certain speed. You would use Pythagoras Theorem to figure out the distance between towers and the enemies.


No you wouldn't, you can just use the distance formula.

http://www.mathwarehouse.com/algebra/distance_formula/images/distance-formula4.gif

What you would still need to use is some basic trigonometry to calculate the angles you need to shoot at.
 

Posted Feb 26, '12 at 7:09am

ExplosionsHurt

ExplosionsHurt

262 posts

That distance formula you've got there is really just an extended version of Pythagoras anyway.

Generally the towers shoot fast enough that you can just make the missiles homing. Having towers that miss and you can't control their aiming is horrible design anyway.

 

Posted Feb 27, '12 at 5:11pm

BlueJayy

BlueJayy

27 posts

http://www.mrsunstudios.com/blog/flash/tutorial-create-a-tower-defense-game-in-as3/

This tutorial doesn't really go into the actual shooting of the towers, but it does teach you about enemy pathing and tower range/placing.

 

Posted Feb 27, '12 at 5:12pm

BlueJayy

BlueJayy

27 posts

Link was broken. Sorry. :P

[url=http://www.mrsunstudios.com/blog/flash/tutorial-create-a-tower-defense-game-in-as3/]

http://www.mrsunstudios.com/blog/flash/tutorial-create-a-tower-defense-game-in-as3/

 
Reply to Tower defense tutorial

You must be logged in to post a reply!