ForumsProgramming ForumTower Defense

21 8269
jesse022190
offline
jesse022190
3 posts
Nomad

I am trying to code my second ever game and my first ever TD does anyone know of any really good tutorials? I have tried a couple I found in Google for Tower defense but they were not tremendously helpful. I am looking for something that breaks down basically all the code for a Tower defense game. I did my first game in AS2 but I am willing to do AS3 for this one. So any kind of information would help a lot! Thanks in advance!

  • 21 Replies
PixelSmash
offline
PixelSmash
566 posts
Nomad

What you should do first is break down all elements of your game. When you start off with 'I want to make a TD/action/... game', it can get really confusing really fast.
So basically sum up in general what you'd want, and what that requires. For instance, you want to have a tower. This tower will need some specific functions, say for finding a target, firing, reloading, etc. Perhaps you can break it down even further.

What this should do is give you a good overview of what you need. This can make tutorial hunting a lot more easy, since you don't need to search for a whole game tutorial, but rather a specific set of code - which is probably a lot easier to find.

Good luck!

coldplaya
offline
coldplaya
355 posts
Nomad

Wow that site is useful!

jesse022190
offline
jesse022190
3 posts
Nomad

Thanks PixelSmash, I have been just sort of all over the place right now I am going to break down the elements then use kurt's link to build my basics!

Fall0ut
offline
Fall0ut
128 posts
Peasant

Uhm...BUBBLE TANKS TOWER DEFENCE IS THE BEST TOWER DEFENCE GAME IN THE WORLD!!

rjbman
offline
rjbman
215 posts
Nomad

Uhm...BUBBLE TANKS TOWER DEFENCE IS THE BEST TOWER DEFENCE GAME IN THE WORLD!!


....
....
....
Anyone got some more OBVIOUS spam to throw out there?


Seriously, try to post something relevant.

And like Kurt said, that website is amazing.
Hectichermit
offline
Hectichermit
1,828 posts
Bard

you should post it in the Game developer links B)

rjbman
offline
rjbman
215 posts
Nomad

It's some dude named Mr. Sun. But I don't know what he's done. But he is amazing.


If you somehow are reading this MrSun, thank you oh so much!

Fall0ut
offline
Fall0ut
128 posts
Peasant

uhm. what are we talking about?

rjbman
offline
rjbman
215 posts
Nomad

http://www.mrsunstudios.com / http://www.flashgametuts.com

They're run by someone; they're pretty good tutorials to learn from.

PixelSmash
offline
PixelSmash
566 posts
Nomad

Hmm, didn't think I'd see what I saw at that site, kurt... thought - as the name suggested - it was mostly PHP, but it turns out they actually have quite a bit of AS3 , both text and video. Quite a nice find!

rjbman
offline
rjbman
215 posts
Nomad

Wow good job Kurt! Love the new link!

rjbman
offline
rjbman
215 posts
Nomad

Yeah exactly. Usually there's a way to do something complex with something easy; like bouncing off a wall. That's in my first flash tutorial, and i never would have thought to do it like that.

So my game's probably got about 200 lines more than it needs(its about 1K)

rjbman
offline
rjbman
215 posts
Nomad

Yeah. I'm sure my second game's going to be more streamlined. You know, with &quotlanning ahead" and stuff like that.

fractalman
offline
fractalman
635 posts
Nomad

Breaking it down is a good idea.

What I'd do-and this is by no means recommended for all cases-is start by thinking, "what's the absolute minimum I need for a tower defense to be called tower defense?"-then I'd implement crummy, prototype versions of each thing, while attempting to leave as much room for new subroutines as possible. Creeps (hp, movespeed), a start point, end point, towers(damage, range, firerate), resource, building more towers (click handling), and the ability to restart without refreshing everything.
Then I'd go and either build a new program with the old one in view, or start replacing subroutines one-by-one with more complex and interesting versions (waypoints for a track, multiple creeps/wave, additional creep attributes, tower upgrading, etc).

Showing 1-14 of 21