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 / Weird joystick problems...

Author
Message
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 17th Nov 2008 08:16
I am trying to read from a control pad, however, after quite a bit of messing around with the joystick commands, nothing registered. My last attempt was to simply read the x,y and z values using CONTROL DEVICE X() Y() and Z() commands. It worked, proving that the pad still worked. My question is how can I make this read as a joystick, so that I can read the button presses.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
steve paul thomas
16
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 17th Nov 2008 15:41 Edited at: 17th Nov 2008 15:42
If you mean, "how do you read individual presses"?... Have you looked at this Example (from DBC help):



I'm using a USB joypad and it works fine with these commands.
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 18th Nov 2008 01:35
That's what I mean, unfortunately, it doesn't respond to the joystick commands. I can get values for x,y, and z using CONTROL DEVICE X(), CONTROL DEVICE Y(), and CONTROL DEVICE Z(), but every joystick command just returns 0.

The pad is supposed to be plug and play, which is why I was confused that this doesn't work.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
steve paul thomas
16
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 20th Nov 2008 06:43
Hello BN2

Sorry, I have been away from the forum for a few days. Are you still having this problem? What happens when you run the program above?

As you probably know, that program is an example from "DARKHELP". If you run the program does the circle change colours when you press buttons on your joypad? It should do.

If not, then I guess your pad either isn't fully-compatible or perhaps the buttons are broken? Do they work in games/other software?
steve paul thomas
16
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 26th Nov 2008 22:58
Hey BN2 Productions

Did you solve the problem?
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 26th Nov 2008 23:45
Just gave up actually, wasn't a big deal. Still wish I had a solution though

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
steve paul thomas
16
Years of Service
User Offline
Joined: 4th Nov 2008
Location: United Kingdom
Posted: 27th Nov 2008 03:53 Edited at: 27th Nov 2008 03:54
Are you sure it wasn't just a dead joypad?

Or perhaps absence/corruption of its driver software?

Have you tried another joypad (borrowed a friend's?)

I am using the most craptastic USB joypad for my project and it works. Can only think of what I have mentioned before as being reasons why you are having this problem.

Still, might be best to move onto something else if joypad input is not too important to you. Sorry, BN2.

Login to post a reply

Server time is: 2025-06-07 17:10:28
Your offset time is: 2025-06-07 17:10:28