A83: trajectory...


[Prev][Next][Index][Thread]

A83: trajectory...




I was thinking that it would go something like this...
;in pusedo code
;X = x coord
;Y = y coord
;G = gravity mult, Y*G = highest point on arc
;D = Drag in CM per Second
;S = CM per Second
;each X coord is 1cm from the other, so this is one helluva slow 
;object.  
start:
 push S
loop1:
 inc X
 dec S
 If S(/=)0
 Goto loop1
 inc Y
 If Y=Y*G
 Goto fallingDown
 Goto DispSpriteAtXY
DispSpriteAtXY:
;code for displayer sprite
 goto loop1
DispSpriteAtXY2:
;code for displaying sprite
 goto loop2
fallingDown:
 push S
loop2:
 If S-D(/=)0
 inc X
 dec Y
 If Y=0
 Goto End
 Goto DispSpriteAtXY2
End:
 pop S
 ret

AM NOT SURE BUT IT SHOULD GIVE YOU AN ARC IF I DID IT RIGHT...
-Phelan 'Amen' Wolf

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com