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.

DarkBASIC Discussion / Hovercraft Joystick Problems

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 3rd May 2004 23:23 Edited at: 27th Jul 2004 04:09
I converted the example 14 of "The Monster Hunt's" game so I can have a hovertank that can straffe left and right and go forwards and backwards but I have a problem with the joystick I can't get it to turn properly.

In one example, the joystick simply doesn't turn properly and I have another example and the joystick turning left and right simply dosen't work

Can anyone tell me where I am, going wrong? This is best answered with someone with a simple joystick that can turn left or right
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 8th May 2004 22:09
Crickey ! Anyone there?
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 27th Jul 2004 04:08 Edited at: 27th Jul 2004 23:38
I would really like some help with this please
Balid
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 27th Jul 2004 12:40
vampyre,

I don't see where you set OldCamAngleX# or OldCamAngleY#.

How about using the 'TURN CAMERA LEFT' and 'TURN CAMERA RIGHT' commands with your 'if joystick left()' and 'if joystick right()'.
Set the angle to something like 1 to start and remove or comment the 'Xrotate camera CurveAngle(CameraAngleX#,OldCamAngleX#,24)' line.

Just an idea.

vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 27th Jul 2004 23:45
Balid, I tried using the "turn object left" commands and it didn't work at all so I tried "turn camera left" and "right commands and they didn't work either I still get a jerky type of turning movement or it turns too far around and it , the turning isn't precise
Balid
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 28th Jul 2004 13:20 Edited at: 28th Jul 2004 13:23
vampyre,

I don't have any ideas. I been having some trouble with the joystick in my game. It was all working great and then I made some changes and I can only move in the joystick y() direction. Oh well I'll find it, and you don't need my problems.

If I find something I will let you know.

vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 29th Jul 2004 04:14
Thanks Balid, I think the way around this hovercraft control thing might be using menu screens but I don't know anyone or I have no knowledge of how to do a menu screen
Balid
21
Years of Service
User Offline
Joined: 21st Nov 2003
Location: MI, USA
Posted: 29th Jul 2004 13:39
Good luck. I have not started into menu screens in DB yet myself.

vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 29th Jul 2004 23:02
Thanks Balid
Aramil
21
Years of Service
User Offline
Joined: 27th Oct 2003
Location: Wherever my feet take me
Posted: 1st Aug 2004 05:11 Edited at: 1st Aug 2004 05:14
Hmmm...okay...this is just coming up out of the top of my head...

Hope it helps. I use the curveangle thing to get smooth motion. I use it whenever I do joystick stuff. Makes it really simple.
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 3rd Aug 2004 06:31
I see,Aramil, the curveangle command? I will try it
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 16th Aug 2004 04:23 Edited at: 16th Aug 2004 04:23
Solved this as well well I got it solved for me
phukol
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location:
Posted: 19th Aug 2004 01:27
hope this helps, "DBC and DBPro got major problems in the accuracy of the joystick (mostly joypads are simpler to use), try using a deadzone variable in order to get precise movements. heres an example


where deadzone is an array used in the start of the gme and contains the prefered sensitivity. and out is a variable used to know if a key is pressed. hope that sheds some light

phukol
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 19th Aug 2004 08:09
Thanks phukol although I have had this problem solved I will take this code just incase I need itat some stage

Login to post a reply

Server time is: 2025-05-25 02:27:04
Your offset time is: 2025-05-25 02:27:04