• Advertisement
Sign in to follow this  

How to use DirectInput

This topic is 4631 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i'm a student from Majorca, Spain. I'm developing a game and i'll use a force-feedback dispositive for it. I'm searching for a howto or a tutorial about DirectInput that explains how it works, how i can program it, and others... If somebody knows anyone, or can help, please post here. Thanks a lot. PD: Please, excuse me about my mistakes. I know that my english is very bad.

Share this post


Link to post
Share on other sites
Advertisement
Start by reading the DirectInput documentation. Make sure you look at the DirectInput samples too. Regarding force feedback, there are 2 samples I know of:
1) FFConst, which sets a constant force feedback value determined by the user
2) ReadFFE, which reads a DirectInput effects file and plays all the effects in it.

Both samples are available in the summer update 2004 SDK, but I'm not sure about later versions (Samples get cut out sometimes).

By the way, your english isn't bad. Your post was very comprehensible.

Share this post


Link to post
Share on other sites
mmm...I've read it yet, but i don't understand it so much. I think it should be very simple, but the examples aren't so clear for me. Also, i read the MSDN especifications and examples, but...it takes me confused. I'm a beginer for this, please don't get angry.
I know that i should capture de device, and then use a feedback funtion to controlle the device. And when the program ends, i should release it. But i'm not able to implement that function. I'm blushing for it, please excuse me.

Another question: can I use DirectInput in a OpenGL source?That's because i'm programing the game with it, and i'm not sure that i can do it..

mmm...and finally, do you know somewhere where i can find any example about directinput interactuating with a ff wheel in c++?

Thanks a lot for your help...

Share this post


Link to post
Share on other sites
Quote:
Original post by jordiroig
mmm...I've read it yet, but i don't understand it so much. I think it should be very simple, but the examples aren't so clear for me. Also, i read the MSDN especifications and examples, but...it takes me confused. I'm a beginer for this, please don't get angry.

It's ok, no one's getting angry. People are here to help [smile]
Perhaps you'd find these 3 tutorials useful. In generally, googling for "DirectInput tutorial" will give you some good results.

Quote:
Another question: can I use DirectInput in a OpenGL source?That's because i'm programing the game with it, and i'm not sure that i can do it..

Yes, you can use DirectInput with OpenGL or anything else in the same application.

Quote:
mmm...and finally, do you know somewhere where i can find any example about directinput interactuating with a ff wheel in c++?

Unfortunately, no. The only tutorial force feedback tutorial I know is this, which enumerates force-feedback devices, creates one, and plays an infinite effect.

Share this post


Link to post
Share on other sites
Hi

If you want I can send you my cJoystick() class which deals with joystick using DirectInput. Right now Feedback effects are not handled, but it could help You..

Share this post


Link to post
Share on other sites
Hi Iliak,

Ok. If you want to send me your classes, i'll enjoy it a lot... my e-mail is jordiroig_at_gmail.com
Now i'm trying to develop my own class, but i'm on exams', and i'm very busy. Thanks a lot for your help...I'll waiting notices from you.

By..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement