Jump to content
  • Advertisement

Archived

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

Gorky

Multithreading keyboard

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

Chris, Any chance to make the DInput keyboard routine become multi-threaded? I ask because it is possible to make any app come to a crawl, therefore making it very hard to close an app via esc key. With the keyboard always polling for data behind the game, it never has to slow down when the video comes grinding to a halt. E.g your new dancing girls demo. If you got one frame per sec, I''ll probably get around .05 per sec. Any app can simulate slow speeds by changing PR_InitTimer''s parameter. You''re current character array system would have to change. You check once per frame to see if keys are pressed. The new way has the multi-threaded keyboard place keys into a queue vs. a buffer. Then the game can work off the queue, while the keyboard portion is always feeding it data. No key presses should ever be lost. More importantly, you can have the keyboard mechanism instantly close the main app, if the user chooses to do this. Nothing sucks more than not being able to close a game!

Share this post


Link to post
Share on other sites
Advertisement

  • 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!