360 Controller with rumble?
BlitzMax Forums/BlitzMax Programming/360 Controller with rumble?
| ||
Are there any libs that will allow me to use a (wired) 360 controller and use the rumble features (and of course all buttons and sticks?) |
| ||
Can't you use Pub.FreeJoy? I don't see support for rumble in there though. I'm still waiting for my wired 360 controller to come in so I intend to look at somewhere next week. |
| ||
I have a lib for Blitz3D. Maybe it could be adapted to Max, but I dont have Max (yet, hopefully soon) to do it myself. Note that it's Windows only (and XP/Vista - dont know about Win7), wont work on Linux or Mac |
| ||
As HTBAA said.Graphics 400,400 Local I:Int = 0 While Not KeyHit(KEY_ESCAPE) Local E:Int = 0 For i = 1 To 32 If JoyDown(i) Then e = 1 Notify i End If Next If e = 0 Then For i = 1 To 1000 If JoyDown(i) Then Notify i End If Next End If Wend is what I used for finding the codes of which keys do what (just press them with that code with controller hooked into usb). Unfortunately I seem to have misplaced the codes for the buttons themselves. Not sure about rumble either. |
| ||
XBox360 controller PUB.FreeJoy Button codes: Button A=0 Button B=1 button X=2 Button Y=3 Button LB=4 Button RB=5 Button Back=6 Button Start=7 Button left stick=8 Button right stick=9 Analogue: Left stick=JoyX/JoyY Right stick=JoyU/JoyR Left trigger/Right trigger=JoyZ *Left trigger is positive and right trigger is negitive D pad=JoyHat Unavailabe: No Big-X button or rumble |
| ||
Cool, thank you! Saves me some work to find it out when I get my controller. Maybe there's some free public library that enables rumble support? |
| ||
Try this for basic rumble support. Just copy and paste everything above the demo code into your own program, and call the functions listed at the top. (I haven't made this Strict-friendly, so you'll have to tweak it if your own code is Strict/SuperStrict.) Try changing the controller port number if it doesn't work for you. |
| ||
Here's the FreeJoy demo with rumble added to the analog sticks. Try holding both sticks all the way back and then move one or the other up and down to feel the low and high frequency motors in action. |
| ||
Oh this is extremely cool, thanks! My controller is still being shipped from Hong-Kong though. |
| ||
Just tested this, it works great. Thanks! |
| ||
Hello. What do you think you're doing, saying "Thanks!" - my God! It sounds as if you're grateful :o) Goodbye. |
| ||
And your problem is... what? I just thank the guy for taking the time to figure out, which saves me time. Nobody gets harmed when someone gets thanked for his or her work. |
| ||
He was joking (dry sense of humour, but whatever). Anyways, awesome rumble effect though - thanks for sharing this :) |
| ||
In that case don't mind me... |