Hi,
Someone was looking for code for moving a ship in space.
I found this in my old code from years ago.
Rem Created: Sunday, June 06,2007
rem by renny and gus
sync on : sync rate 60
set display mode 1024,768,16
`Create world
make matrix 1,10000,10000,50,50
position matrix 1,-500,0,500
make object cube 1,20,
position object 1,0,10,100
forwardvelocity = 0
backwardvelocity = 0
movetime=timer()
burntime=timer()
do
set cursor 20,20
print "ForwardVelocity = ",forwardvelocity
print "backwardvelocity = ",backwardvelocity
if timer()>movetime+200
move object 1,forwardvelocity
movetime=timer()
endif
if timer()>movetime+200
move object 1,backwardvelocity
movetime=timer()
endif
if keystate(30)=1 and timer()>burntime+500
inc forwardvelocity
dec backwardvelocity
burntime=timer()
endif
if keystate(16)=1 and timer()>burntime+500
inc backwardvelocity
dec forwardvelocity
burntime=timer()
endif
`Control camera
rotate camera wrapvalue(camera angle x()+mousemovey()),wrapvalue(camera angle y()+mousemovex()),0
sync
loop
Life is not fair, so deal with it.
http://www.gusroundtable.com/