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