Quote: "The Ships movement is Great, but..
Its moving quite slow..
I took a look and couldn't find a way to speed it up."
You can see that the #2 object is moved by 5 units, whether up, down, left or right. All you need to do is increase that amount to make it faster. So, if you change the 5 to say, 25, it will move faster. Bear in mind, that at some point, you are going to need to do some collision-checking and moving 25 units at a time is a lot in my view.
Quote: "The Camera is Good too but
Ive noticed the camera does move
Left Right Up And Down..
Is there any way to change the camera part
of the code to make it so
camera only moves In the direction the ships facing?"
Not sure what you mean here. I revised your code to do what I think you are asking here.
autocam off
hide mouse
sync on : sync rate 60
` GOSUB Flight
rem ********************************************************************
rem FLIGHT
rem ********************************************************************
Flight:
rem Make wire sky sphere
make object sphere 1,5000
set object 1,0,0,0
rem Make Ship Object
make object box 2,150,5,20
make mesh from object 2,2
delete object 2
make object box 2,25,15,100
add limb 2,1,2
position object 2,0,0,-3100
rem Mark a Back Position
make object sphere 3,10
position object 3,20,100,20
rem Set camera range
set camera range 1,10000
pitch object down 2,11
move object 2,-350
position object 3,object position x(2),object position y(2),object position z(2)
move object 2,350
pitch object up 2,11
rem Place camera and set orientation to object
position camera object position x(3),object position y(3),object position z(3)
set camera to object orientation 2
rem Main loop
do
rem Control free flight object
if downkey()=1
x# = object position x(2)
y# = object position y(2) - 25.0
z# = object position z(2)
position object 2,x#,y#,z#
endif
if upkey()=1
x# = object position x(2)
y# = object position y(2) + 25.0
z# = object position z(2)
position object 2,x#,y#,z#
endif
if leftkey()=1
y# = object angle y(2)
ay# = wrapvalue(y# - 90.0)
yrotate object 2,ay#
move object 2,25
yrotate object 2,y#
endif
if rightkey()=1
y# = object angle y(2)
ay# = wrapvalue(y# + 90.0)
yrotate object 2,ay#
move object 2,25
yrotate object 2,y#
endif
` if inkey$()=\",\" then roll object left 2,5
` if inkey$()=\".\" then roll object right 2,5
move object 2,10
move camera 10
rem Get back position of object for camera
rem Update screen
sync
loop
Note: You GOSUB to the Flight subroutine, but this is unneeded, so I REMed it out. To me, it would be better to write a subroutine that you could call from your main DO - LOOP called MovePlayer, or something like that. It would make more sense. Also, you didn't have a SYNC rate set, so I set it at 60. Otherwise, it will run as fast as the host computer can run, which would not necessarily be a good thing.
So many games to code.....so little time.