Advertisement

Keyboard input question

Started by July 19, 2000 09:21 AM
0 comments, last by Prairie 24 years, 5 months ago
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
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.

This topic is closed to new replies.

Advertisement