Get the latest Education e-news
 

Go Back   Game Career Guide Forums > Programming
Forum Home Register Members List Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-10-2007, 04:29 AM   #1
h2osmack
Junior Member

Activity Longevity
0/20 20/20
Today Posts
0/11 sssssss11
Default 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
h2osmack is offline   Reply With Quote
Old 07-10-2007, 02:20 PM   #2
Gshonk
Moderator

Activity Longevity
0/20 20/20
Today Posts
0/11 ssssss831
Location: Philadelphia, PA
Default

Yea, it was surprisingly easy the first time I did it too.
__________________
Grant Shonkwiler()
"I would love to fix the world if someone would just give me the source code"
Website Industry blog LinkedIn
Gshonk is offline   Reply With Quote
Old 07-11-2007, 08:05 AM   #3
h2osmack
Junior Member

Activity Longevity
0/20 20/20
Today Posts
0/11 sssssss11
Default

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.
h2osmack is offline   Reply With Quote
Old 07-13-2007, 06:32 PM   #4
HagNasty
Super Moderator

Activity Longevity
0/20 20/20
Today Posts
0/11 ssssss123
Location: Toronto Ontario
Default

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.
__________________
~Justin Dooley

C, C++, C#, Objective-C, Java, PHP, SQL, Javascript, Actionscript, HTML, CSS
HagNasty is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
All times are GMT -8. The time now is 05:20 PM.






UBM Tech