Hi!
Im currently coding a 2D Space Shooter. Now I have added a satellite flying around the player ship. The code is something like that:
Of course, the satellite should fire some shoots in the correct direction and i don't know how to calculate the Shoot\DX and Shoot\DY Values. I move every shoot like this:
Shoot\X=Shoot\X+Shoot\DX
Shoot\Y=Shoot\Y+Shoot\DY
I hope you know what I mean.
Im currently coding a 2D Space Shooter. Now I have added a satellite flying around the player ship. The code is something like that:
Satellite\Pos=Satellite\Pos+1 If Satellite\Pos>360 Then Satellite\Pos=Satellite\Pos-360 If Satellite\Pos<0 Then Satellite\Pos=Satellite\Pos+360 Satellite\X = Sin(Satellite\Pos)*50 Satellite\Y = Cos(Satellite\Pos)*40 Satellite\Frame = (360-Satellite\Pos)*8 / 360 If Satellite\Frame>7 Then Satellite\Frame=Satellite\Frame-8 DrawImage SPR_Satelite,Player\X-Satellite\X,Player\Y-Satellite\Y,Satellite\Frame
Of course, the satellite should fire some shoots in the correct direction and i don't know how to calculate the Shoot\DX and Shoot\DY Values. I move every shoot like this:
Shoot\X=Shoot\X+Shoot\DX
Shoot\Y=Shoot\Y+Shoot\DY
I hope you know what I mean.