Game Career Guide Forums

Game Career Guide Forums (http://www.gamecareerguide.com/forums/index.php)
-   Programming (http://www.gamecareerguide.com/forums/forumdisplay.php?f=7)
-   -   Programming xbox controllers (http://www.gamecareerguide.com/forums/showthread.php?t=160)

h2osmack 07-10-2007 04:29 AM

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

Gshonk 07-10-2007 02:20 PM

Yea, it was surprisingly easy the first time I did it too.

h2osmack 07-11-2007 08:05 AM

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.

HagNasty 07-13-2007 06:32 PM

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 02:21 PM.

Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.