Im not asking how to code this but I am asking if anyone has any advice or techniques useful for making such a game. This will be my second game so any advice is welcome! I am looking to make this something like bloons tower defense. Thanks in advance!
I have prototyped TD before. The two biggest problem,
- enemy movement when the path consists of curves
- tower aiming and locking logic (but it’s easy now)
Ok so I am pretty sure I have the first part figured out to some degree, but how would I figure out that second part? I have never done an angles or anything like that in java yet…
Enemy movement is hardest. Although finding a path is trivial, how the enemy entities traverse it can be done very easy or hard (steering, flocking, collision avoidance, etc).
Simply interpolating the position of entities between a set of coordinates is simplest.
Spawn enemy entities at different times, like 200-300 ms. between each, so that they don’t overlap each other in one blob.
You could offset coordinates in each path so entities don’t seem to moving along the same line, and gives them a little spread.
But this is fine tuning, just get them to traverse a set of coordinates first via interpolation.
You said you figured out the first part, what are you thinking?
Well I had previously posted a thread about that which gave me some pretty good ideas : http://www.java-gaming.org/topics/making-something-follow-a-particular-path/28257/view.html
Does anyone know how I could make the towers attack the attackers?
If the attackers come in a certain radius (easy - distance formula) then attack.
For attacking (I’m assuming projectile) just animate the image moving towards the attacker (use some linear algebra or a bunch of if statements if you’re lazy).
Oh ok i think i understand now. thanks!