Posted: 19th Dec 2003 17:56
Sorry about this, this is the spaceship version sorry I edited the post so it's a bit back to front as I have had to edited the thread (stupid pop up adverts interfering every damn time,) still here they both are you will have to work out doing a 1st person camera yourself

+ Code Snippet
rem DARK BASIC EXAMPLE PROGRAM 18
rem ==========================================
rem This program shows free flight movement with H.O.T.A.S sticks
rem ------------------------------------------
rem updated by Vampyre(Ian George)
autocam off
hide mouse
sync on

rem Make wire sky sphere
make object sphere 1,5000
set object 1,0,0,0

rem Make flying 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,500

rem Make drone to mark a back position
make object sphere 3,10

rem Set camera range 
set camera range 1,10000

rem Set text font
set text font "Arial"
ink rgb(255,255,0),0
set text size 30

rem Main loop
do

	rem User prompt
	center text 320,0,"FREE FLIGHT ORIENTATION"
	center text 320,25,"If you Have any H.O.T.A.S System ,"
   center text 320,50,"Use the Joystick to Pitch Up and Down"
	center text 320,70,"Use Your H.O.T.A.S. Rudders to Roll"
	center text 320,90,"Use Your Joystick Throttle to Move"
	center text 320,110,"Use SPACE to Reset"

	rem Control free flight object
	if joystick up()=1 then pitch object up 2,5
	if joystick down()=1 then pitch object down 2,5
	if joystick left()=1  then turn object left 2,5
	if joystick right()=1 then turn object right 2,5
	if joystick twist z()= 1000 then roll object left 2,5
	if joystick twist z()=-1000 then roll object right 2,5
	if joystick z()=-1000 then move camera 20 : move object 2,20
  	if spacekey()=1 then rotate object 2,0,0,0

	rem Get back position of object for camera 
	pitch object down 2,11
	move object 2,-150
	position object 3,object position x(2),object position y(2),object position z(2)
	move object 2,150
	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 Update screen
	sync

loop
Posted: 19th Dec 2003 17:59
Hello, this is my submission, this is the free flight example updates for those with H.O.T.A.S joysticks (Hands On Throttle And Stick) like the Saitek X36USB , X45 USB X36 Gameport, Thrustmaster Afterburner USB Joysticks I will do two simple Joystick and keyboard versions and a Force Feedback version soon

This is the Aircraft version:

+ Code Snippet
rem DARK BASIC EXAMPLE PROGRAM 18
rem ==========================================
rem This program shows free flight movement with H.O.T.A.S sticks
rem ------------------------------------------
rem updated by Vampyre(Ian George)
autocam off
hide mouse
sync on

rem Make wire sky sphere
make object sphere 1,5000
set object 1,0,0,0

rem Make flying 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,500

rem Make drone to mark a back position
make object sphere 3,10

rem Set camera range 
set camera range 1,10000

rem Set text font
set text font "Arial"
ink rgb(255,255,0),0
set text size 30

rem Main loop
do

	rem User prompt
	center text 320,0,"FREE FLIGHT ORIENTATION"
	center text 320,25,"If you Have any H.O.T.A.S System ,"
   center text 320,50,"Use the Joystick to Pitch Up and Down"
	center text 320,70,"Use Your H.O.T.A.S. Rudders to Roll"
	center text 320,90,"Use Your Joystick Throttle to Move"
	center text 320,110,"Use SPACE to Reset"

	rem Control free flight object
	if joystick up() then pitch object up 2,5
	if joystick down() then pitch object down 2,5
	if joystick twist z()=1000  then turn object left 2,5
	if joystick twist z()=-1000 then turn object right 2,5
	if joystick left()= 1 then roll object left 2,5
	if joystick right()= 1 then roll object right 2,5
	if joystick z()=-1000 then move camera 20 : move object 2,20
  	if spacekey()=1 then rotate object 2,0,0,0

	rem Get back position of object for camera 
	pitch object down 2,11
	move object 2,-150
	position object 3,object position x(2),object position y(2),object position z(2)
	move object 2,150
	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 Update screen
	sync

loop
Posted: 19th Dec 2003 18:41
these should also work with joystick ,throttle and pedal's so if you have old Thrustmaster serial gear or you have expensive CHproduct gear it should also work with those
Posted: 20th Dec 2003 2:10
and here is the good old, plain old joystick and keyboard version
+ Code Snippet
rem ==========================================
rem DARK BASIC EXAMPLE PROGRAM 18
rem ==========================================
rem This program shows free flight movement
rem ------------------------------------------
rem modified by Vampyre
autocam off
hide mouse
sync on

rem Make wire sky sphere
make object sphere 1,5000
set object 1,0,0,0

rem Make flying 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,500

rem Make drone to mark a back position
make object sphere 3,10

rem Set camera range 
set camera range 1,10000

rem Set text font
set text font "Arial"
ink rgb(255,255,0),0
set text size 30

rem Main loop
do

	rem User prompt
	center text 320,5,"FREE FLIGHT ORIENTATION"
	center text 320,35,"Use ARROW KEYS to Turn and Pitch"
	center text 320,60,"Use [<] and [>] to Roll"
	center text 320,85,"Use LMB to Move"
	center text 320,110,"Use SPACE to Reset"

	rem Control free flight object
	if joystick up()=1 then pitch object up 2,5
	if joystick down()=1 then pitch object down 2,5
	if joystick left()=1 then turn object left 2,5
	if joystick right()=1 then turn object right 2,5
	if leftkey()=1 then roll object left 2,5
	if rightkey()=1 then roll object right 2,5
	if upkey()=1 then move camera 20 : move object 2,20
	if spacekey()=1 then rotate object 2,0,0,0

	rem Get back position of object for camera 
	pitch object down 2,11
	move object 2,-150
	position object 3,object position x(2),object position y(2),object position z(2)
	move object 2,150
	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 Update screen
	sync

loop
Posted: 28th Dec 2003 11:41
Nice
Posted: 28th Dec 2003 22:15
Thanks Colin, it's nothing much though, needs a 1st person and 3rd person view to really make it good
Posted: 10th Jan 2004 3:31
this is damn familiar
Posted: 15th Jan 2004 5:53
Oh dear, sorry, thought I said it was a modification of the free flight example, still that is what it is , although I will try to make a 1st person view with a Joyhat controlled camera