Jump to content
  • Advertisement


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


dInput or no dInput?

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

Is it a good idea for me to use direct input. My prject will be keyboard and mouse based so I was wondering if I really need it considering the windows messaging system seems to work well.

Share this post

Link to post
Share on other sites
I dont know much about the hardware-to-sofware and which is faster etc. but I can tell you that DirectInput is a must for your game. I use it for Pushed, NotPushed, and Released. You can do anything with DirectInput since you have acces to the buffer where the Data is stored. With Window Messages, you dont have acces to the Data. But if you do use the WM''s you can store them and handle them in your MainGame Loop.

Conclusion: DirectX rules.


Share this post

Link to post
Share on other sites
For ALL text input use the Windows message system. The reasons are many.

For game control input in an action type game, DInput does allow you to bypass a lot of processing between the keyboard hardware and the message side. So for the absolute lowest latency on your *control* input, DInput might be preferable to you.

But Windows keyboard and mouse input is fine for most applications, particularly with things like GetAsyncKeyState() to go a bit deeper than the message system (which is queued so is never quite so direct) - DInput goes the next level deeper but not too much more.

[Just had a flash of nostalgia -: $BFEC01 and the related keyboard serial comms error handling, flag checking etc on the Amiga (just peeking the register was baaaad since it relied on OS support to tidy up the buffer mess). CIA port redirection anyone - flashing caps lock keys ahoy ]

Simon O''Connor
Creative Asylum Ltd

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!