Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Mouselook flight revisted

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 22nd Sep 2006 23:28 Edited at: 22nd Sep 2006 23:29
I think that this might work but at the moment can't get Dark Basic to compile and run the program as I have a bit of a crappy hard drive, still I will put it up.



hope it works you have to get your own media and model
DarkMasta
18
Years of Service
User Offline
Joined: 21st Apr 2006
Location: Typed on your screen.
Posted: 26th Sep 2006 17:36
I'll have a look at it.

Wherever you plan to go,
it's the next step you never know.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 26th Sep 2006 21:42
Thanks DarkMasta
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 27th Sep 2006 19:27
@DarkMasta, did it work then?
lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 28th Sep 2006 02:57
I had to change a few lines to make the turn and pitch work:

Since mousemovex() and mousemovey() get the change in mouse position since the last time they were called, it is best to store the values in variables, calling each only once each frame.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 28th Sep 2006 06:01
Oh OK lower logic thanks.

When I get my PC working I shall test it.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 13th Nov 2006 17:47 Edited at: 13th Nov 2006 22:41
OK Got my lousy PC to work well stupid ME to work half decent (Lousy OS) and here is a version where you can straffe left and right, rotate left and right and move foward and backward.

You can also use the mouse to steer, thanks lower logic for the adjutments, however you can only use the rudders when you come to a stop unfortunately but I trust those who are clever enogh will work out a way to improve on what I call mouselook mousespaceflight a
lot better than the Freelancer system I think. Actually I have I think a better version now I come to think of it.


Here it is

Yes this has dual controls and you use the mouse to steer and look around (although not hatlike, want that get? a joystick with a hat look on ebay you can get great bargins on there) and you can use the q and e keys for rudders and the wasd to move forward and backward and straffe left and right and you can use the delete and page down keys for rudders and the cursor/arrow keys for straffing and moving forward and backward
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 27th Nov 2006 02:53 Edited at: 27th Nov 2006 02:59
By the way I think I will also put a joystick , mouse keyboard and joystick throttle with straffing with all controls on this one id for the Thrustmaster Attack Throttle:

then this is for any USB joysick with throttles and rudders


And this is for the X36/X45 USB Sticks


And I might put on up for hovercraft so people can have a good basis for a hovercraft tank , show some class if you use this code in your game and at least give me a bit of credit
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 27th Nov 2006 03:00 Edited at: 15th Oct 2007 02:18
OH yes testbox .x is for you to make so get your own media and model please, bye, unless you would like me to knock up one for you and that will mean a zip file
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 29th Nov 2006 17:02
Oh yes sorry have to add this it might be best to cut either the cursur keys or the wasd contrl keys as there seems to be a strange problem with the straffing controls it seems I might be wrong but it seems that Dark Basic can only take two different straffing controls at a time
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 29th Nov 2006 22:06 Edited at: 29th Nov 2006 22:06
Ill have a look at it.


Load Programmer "Crazy Programmer",1
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 7th Dec 2006 03:09
Thanks Crazy Programmer

Login to post a reply

Server time is: 2024-11-22 23:15:16
Your offset time is: 2024-11-22 23:15:16