there are 2 tanks shooting at each other in turns and you are supposed to change the angle (moving arrow up or arrow down) and the power with which the projectile is flying (holding down the space the longer you hold the more power the projectile gets).
So far managed to make a small figure moving around the screen and shooting but until this point I made it shoot only in a straight line
searched a lot of links and videos about this problem I found the formulas needed for calculating the curve but still have problems applying it in my code :/ I`m open to any suggestions or criticisms I`m sure I`m doing something wrong all advices and code examples will be gladly appreciated looking forward for your posts I really need help with the parabola problem .
Here is the shoot method which makes the projectile move it`s a rectangle :
(sorry for not putting the code in tags for some reason when I do it does not print the whole code)
public void shoot()
bullet.x -= 5;
if (bullet.x <= 0)
readyToFire = true;
boom = true;
//power = 0;
I also attached a rar with the whole code so far it`s only 2 classes it`s not much
Edited by PsionicTransvection, 17 August 2012 - 07:52 AM.