this might help:
Rem ***** Main Source File *****
rem Standard Setup Code
sync on : sync rate 60 : autocam off
color backdrop rgb(0,0,0) : hide mouse
set text font "arial" : set text size 18 : set text transparent
`set-up a few objects
make object cube 1, 30
make object plain 2, 500, 500
xrotate object 2, 90
position object 1, 100, 0, 100
position object 2, 0, -16, 0
position camera 0, 300, 300, 50
point camera 0, 50, 50, 0
`main loop
do
gosub display
gosub Input_check
if jmp=1 then gosub Jump_run
if (init_pos + S#)<0 then gosub end_jump
sync
loop
display:
step#=(60.0/screen fps())
text 0, 0, "Use arrow keys to control and space to Jump."
return
Input_check:
rem boring control stuff
if upkey()=1 then move object 1, (5.0*step#)
if downkey()=1 then move object 1, (-5.0*step#)
if leftkey()=1 then yrotate object 1,(object angle y(1))-(5.0*step#)
if rightkey()=1 then yrotate object 1,(object angle y(1))+(5.0*step#)
if spacekey()=1 and jmp=0 then jmp=1 : init_pos=object position y(1)
if jmp=0 then position object 1, object position x(1), floor#, object position z(1)
return
Jump_run:
rem important stuff
if jmp=1 then inc time#, (1.0*step#)
rem equation is Displacement=(initial velocity*time)+(0.5*acceleration*(time^2))
S#=(12.0*time#)+(0.5)*(-0.6)*(time#^2.0)
position object 1, object position x(1), init_pos + S#, object position z(1)
return
end_jump:
jmp=0
time#=0.0
return
Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp