Game Development Community

Xbox controllers

by Nathan · in General Discussion · 07/22/2005 (6:42 pm) · 11 replies

Does anybody know if torque supports xbox controllers? And it does how do I bind the buttons(example: playerkeymap.bind(joy0,a,jump))?

#1
07/22/2005 (6:50 pm)
Try reading www.garagegames.com/mg/forums/result.thread.php?qt=21670 it might give you some clues until someone else posts. :)

Edit: Just noticed your not an SDK owner so you can't access the page... the post dosen't contain code so i'll post it here for you....

Quote:
Hey

Im working with the an xbox controller thats plugged into a usb port . At the momment i have it working with with Nick "Dig" Koirala resource for adding in joystick and gamepad support (its seen as a joystick). i have remapped the controls to the xbox pad but i have a problem with the weels turning.

If i set the turning of the wheels to the xbox buttons (shoulder buttons) they turn at the normal rate but when i use the left thumbstick they seem to turn really slowly and not at all when at speed.

im using TGE 1.3 and starter.racing at the momment

any help would be appreciated

ill do some more digging my self aswell

regards
Kenneth
P.s no idea how to get vibration working (ill digg about with the Direct Input docs)

Reply
Quote:
This sounds like a joystick specific problem. You may have to provide functionality to scale the inputs. Set up a program to "echo" out the values of the joystick. This will tell you the ranges the different buttons put out. Test a few xbox controllers to see if this is consistent. Make a profile in your game for xbox controllers that a user can select. You may check and see if the response is similar in other games that do not "know" about the xbox controller. I don't know if you can autodetect this controller or not.

Good luck,
Frank


Hope it helps in some way :\

Joseph
#2
07/22/2005 (6:58 pm)
Thanks Joseph!!
#3
07/23/2005 (2:30 am)
Torque 1.4 has binds for gamepads, and specifically Xbox controlers. The next version of TSE will also. This will help those of you/us going to consoles (Xbox360) to get a leg up.

Edit: Under Windows.
#4
07/23/2005 (9:22 am)
Also if I use an Xbox controller will the rumble effects work? Because I've heard Xbox controllers have a yellow wire that is for the rumbling, and a USB cord doesn't have a yellow wire. So does this mean no rumbling?
#5
07/23/2005 (9:39 am)
So 1.4 has crossplatform gamepad support?
#6
07/23/2005 (10:37 am)
1.4 will have support for Xbox controllers including rumble on Windows. The yellow wire is not for rumble, it's for video V-SYNC (for light guns).
#7
07/23/2005 (10:42 am)
Rumble support on the 360, not on Windows just because I didn't add it. It could be added easily.
#8
07/23/2005 (11:23 am)
Quote:Rumble support on the 360, not on Windows just because I didn't add it. It could be added easily

How would I go about adding rumble support?
#9
07/23/2005 (11:42 am)
Yeah! hopefully my POV will work correctly with 1.4. As it is now... when you press a direction... and slide around to a different one, it will not register. you have to unpress the first one you pressed before it'll register another press elsewhere on it.
#10
07/24/2005 (9:31 am)
I submitted a diff to Ben Garney that supports the original Xbox controller on Windows including rumble. If you are running the XBCD drivers for your Xbox controller, you can just create a simple Constant Force Feedback effect for rumble. Assuming my diff got accepted for 1.4, this functionality is in and you can just call rumbleJoystick(xForce, yForce);
#11
07/24/2005 (12:37 pm)
Thanks!!