![]() |
Programming xbox controllers
I figured out a way of programming an xbox controller to work with a pc game I made!!! My friend sort of gave me some tips but it's just using directx/xinput. It has to be a wired xbox360 controler though. Still pretty funky hehe
|
Yea, it was surprisingly easy the first time I did it too.
|
I was thinking of making like an object class for it so I can just call member functions every time I want to use the pad (maybe pads), do you reckon it will be easy to do?
Saves me messing about and I reckon it will be cleaner. |
There are a TONE of options to adding gamepad controls. For PC even easier is SDL. One DLL a constructor loop and a update loop then define the keys it's really easy. in the end it actually comes out like this
if(SDL.joystick[i].button.pressed == true) { Car[i].accelerate(); } Look into it there are a lot of tutorials for SDL and it works for almost any controller. I have yet to try it on a 360 controller though. |
| All times are GMT -8. The time now is 07:28 AM. |
Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.