Sign in to follow this  
Haytil

Gamepad with DirectInput

Recommended Posts

Haytil    525
Can anyone point me to a good tutorial for programming the ability to use a gamepad (i.e., Microsoft Sidewinder) with DirectInput in my game? Thanks. -Gauvir_Mucca

Share this post


Link to post
Share on other sites
cNoob    295
im not completly sure on this i only just covered Direct input yestarday and got my keyboard mouse and gamepad. from what i can remember:
search for devices
create the device
SetCooperativeLevel
SetDataFormat
Acquire
pol the device
get information from devise

when finished:
Unacquire
release

think thats the right stages i suggest you pick a book on directx that you could read easily thats what i did i got windows game programming for dummies it covers everything from windows to directx and even show how to make a directx engine.

good luck.

Share this post


Link to post
Share on other sites
moagstar    263
Just have a look at the Documentation that comes with DirectX, theres some straightforward tutorials that explain pretty much everything you need to know for using directinput with gamepads.

Share this post


Link to post
Share on other sites
furby100    102
If you already know how to use the keyboard any mouse, it's fairly straightforward to look it up in the docs, as it works mostly similarly. The main difference is that you can't just ask for the default device and use that, you have to enumerate the devices available and offer the user the ability to choose one. You can also use the action mapper if you want a sort of packaged solution to that type of thing.
I'd advise that you get familiar with using the DirectX documentation anyway, as it means you can learn how to use something independently of whether there's a good tutorial on it or not.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this