Archived

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

Prairie

Keyboard input question

Recommended Posts

I was just wondering about how to get smoothe movement using the keyboard arrow keys. Right now my movement is choppy. I have direct input setup for the mouse, and that works perfectly for fluidness. Should I setup DI for the keyboard as well, and use it in an unbuffered mode (basically a streaming input??). As you can see I am clueless here, so any advice would be greatly appreciated -Prairie

Share this post


Link to post
Share on other sites
Yes use DI for the keyboard handling, this will sort out your problems.
When you have initialised it (its straight forward, but i can explain how if you need it) you just use GetDeviceState which you pass an array and size of your array that will be filled with a snapshot of which keys are currently pressed. This means you dont have to worry about keyboard delays, or repeat delays.

Share this post


Link to post
Share on other sites