sory i did not add to code
Sync on
Sync rate 0
Hide mouse
Autocam off
rem make ground so that you can see where your going
make matrix 1,1000,1000,25,25
Do
rem load gun
load object "gun15.x",1
rem display screen frame rate
set cursor 0,0
Print screen fps()
rem control_player
gosub control_player
gosub control_camera
Sync
Loop
rem subroutines
control_player:
rem remember the old posiitons
oldx#=x#
oldz#=z#
rem basic controls for forwards and backwards movement
If upkey()=1
x#=newxvalue(x#,camay#,5)
z#=newzvalue(z#,camay#,5)
Endif
If downkey()=1
x#=newxvalue(x#,camay#,-4)
z#=newzvalue(z#,camay#,-4)
Endif
rem strafing
If rightkey()=1
x#=newxvalue(x#,wrapvalue(camay#+90),3)
z#=newzvalue(z#,wrapvalue(camay#+90),3)
Endif
If leftkey()=1
x#=newxvalue(x#,wrapvalue(camay#+270),3)
z#=newzvalue(z#,wrapvalue(camay#+270),3)
Endif
position camera x#,100,z#
return
control_camera:
camax#=wrapvalue(camax#+(mousemovey()/3))
camay#=wrapvalue(camay#+(mousemovex()/3))
rotate camera camax#,camay#,0
return