Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


direct input is it worth it?

This topic is 5964 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

I got it up and working pretty quickly when I added it to the
project I''m working on...
I also find it fairly easy to use.

Anything you''re having trouble with?

"da da da"

Share this post

Link to post
Share on other sites
Original post by hello_there
put to use direct input you have to declare class and stuff. but if you use GetAsyncKeyState(); it''s realy easy.

And what does GetAsyncKeyState give you? Do you get the same level of functionality? Do you get joystick support? Mouse? Multiple simultaneous keypresses? Support for throttles, hatches, yokes? Device and device object enumeration?

I think not.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!

Share this post

Link to post
Share on other sites
Well said Oluseyi!

I agree with you on this one, direct input is a very powerful tool, and isn''t that tricky to set up. There are plenty of tutorials on the internet if anybody is stuck. Another advantage is that Direct Input is faster than "GetAsyncKeyState()" as it operates closer to the hardware, with fewer abstraction levels.

My advice...

-If you are making a small demo application, use GetAsyncKeyState(), coz its easier.
-If you are making ANY sort of game or engine, go with Direct Input, coz its better.


Share this post

Link to post
Share on other sites
The best thing to do is not tie direct-input directly with your code. Use an abstraction layer. That way, if the user doesn''t have direct input then they can use a different input driver. It will also make porting the game to platforms without directx much easier.

Share this post

Link to post
Share on other sites
I can point you to my DirectInput wrapper, which you can download from this page. It''s very small, is open source, and is under a very free license (Zlib''s, which lets you do whatever you want with the code, even use it for commercial stuff, and only having to credit me if you ever release the sources... more info is in the site itself).

However, take into account that a new version of that wrapper is coming soon (the same for my DirectDraw wrapper -expect big changes here-, and the first release of my Audio Library)... I''m not sure how much time it will take to me to release the new versions, maybe I''ll be doing so next week or so...

If you want to be noticed by mail every time a new version is released, go join my site''s newsletter.

--H. Hernán Moraldo
Sign up to the HHM''s developers'' newsletter.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!