Game Career Guide Forums

Game Career Guide Forums (
-   Programming (
-   -   Programming xbox controllers (

h2osmack 07-10-2007 03: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 01:20 PM

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

h2osmack 07-11-2007 07: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 05: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)

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:14 AM.

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