View Single Post
Old 29 June 2016, 23:38   #12
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
i would write something like
Code:
bob 1,X+Y,Y+Z,FRM
or depending on which way your axes point, change one or both of the +'s into -'s.
(the above graphics example looks like the Y axis should point up and left, rather than up and right, then again i vaguely remember this sort of game not paying all that much attention to consistency with the background graphics)

to do jumping in my own code, i tend to maintain an upwards velocity variable, call it DZ, then in your game loop do something like
Code:
Z=Z+DZ
DZ=DZ-1
if Z<0
   Z=0
   DZ=0
end if
if Jup(1) AND Z=0 then DZ = 20
you can experiment with the numbers obviously

Last edited by Mrs Beanbag; 29 June 2016 at 23:44.
Mrs Beanbag is offline  
 
Page generated in 0.06253 seconds with 11 queries