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.

Dark GDK / Joystick Troubles

Author
Message
blah569
18
Years of Service
User Offline
Joined: 10th Aug 2006
Location: Austin, TX
Posted: 4th Jul 2008 10:07
I've been playing around with a Joystick with Dark GDK, and it works, for example, if I do:


That works, or if I do:



That works too. However, on this Joy stick, (a Harmonix Guitar for RockBand), has other buttons, like "y," etc. dbJoystickFireY(); is not a legit included function, and dbJoystickY(); does not work.

My question is, is there some kind of function call I can use to see if any key on the Joystick is pressed down, and if so, return like a "keycode," or like "A, B, C," etc. Thanks for any assistance. Another question is, is it possible to use more then one joystick in the application? Like, allow one person to use joystick #1 (the guitar), and another person to use joystick 2
(the drums).

One final question for now, is it also possible to recognize any inputted Microphones, and is it possible to compute a spectrum from the Microphone, so we can determine pitch value?

Any assistance is appreciated, thanks.

PHP, C++, and DarkBasic Pro addict.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 4th Jul 2008 10:13
Look up some info on DirectInput.
blah569
18
Years of Service
User Offline
Joined: 10th Aug 2006
Location: Austin, TX
Posted: 4th Jul 2008 10:54
Quote: "
Look up some info on DirectInput.
"


Well, isn't there some form of an a native solution within Dark GDK?

PHP, C++, and DarkBasic Pro addict.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 4th Jul 2008 10:57
Not really. It is surely based on DirectInput. So, since it doesn't have that command built in, find out how to make your own.
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 4th Jul 2008 23:31
There is a built in function for this. Use dbJoystickFireX(). For example, if you want to see if button 4 is pressed:


You can use window's game controller setup to find out what the button number is.


My site, for various stuff that I make.

Login to post a reply

Server time is: 2024-09-30 01:26:55
Your offset time is: 2024-09-30 01:26:55