Jump to content
  • Advertisement

Archived

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

lurkie

DirectInput vs WM_KEY

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

Advertisement
Certainly... DirectAnything has direct access to the hardware, compared to Windows Messaging, which has any number of processing layers, and may only execute during your program''s Windows message loop. There''s little point to using DirectInput messages if you''re making rinky-dink programs, but for high-performance games you certainly don''t want the clunkiness of Windows and WM_KeyXXX getting in the way.


MatrixCubed
http://www.MatrixCubed.org

Share this post


Link to post
Share on other sites
Fair enough, I can understand that DirectX will be faster than windows messaging but if I was not using DirectX how would I get something of comparable speed. Is getasynckeystate(..whatever..) any good for this?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
For most of games, such as RPG, getasynckeystate is enough to acquire the input status. It''s easy to use and can guarantee the perfomance.

Share this post


Link to post
Share on other sites
or if you''re really not in a hurry, you can use the Windows message WM_KEYDOWN and extract the keycode bit from the wparam to an int. Like I said, this is slow cause first ya gotta wait for the message to be posted, then you gotta process it. But it works.

==============================
"Need more eeenput..."

- #5, "Short Circuit"
==============================

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Gaiiden

or if you''re really not in a hurry, you can use the Windows message WM_KEYDOWN and extract the keycode bit from the wparam to an int. Like I said, this is slow cause first ya gotta wait for the message to be posted, then you gotta process it. But it works.

==============================
"Need more eeenput..."

- #5, "Short Circuit"
==============================


WM_KEYDOWN is designed for pupils.

Share this post


Link to post
Share on other sites
still works....

==============================
"Need more eeenput..."

- #5, "Short Circuit"
==============================

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!