Need help Disabling Keyboard Delays and Rate... 
Author Message
 Need help Disabling Keyboard Delays and Rate...

Ok.  I am making a space game and I want to move the spaceship
flawlessly without delays and Repeat Rates from the Keyboard.  Is
there any way to Illiminate the Keyboard Delay and Keyboard Rates with
VB5 CODE in my game...

Tony



Mon, 25 Feb 2002 03:00:00 GMT  
 Need help Disabling Keyboard Delays and Rate...
You must use the KeyDown and KeyUp events.

Create a state variable which contains the info about the direction to move.

On the keydown event, depending upon the keypress set the state variable.
eg: MoveUp, MoveDown etc. Set a global variable moving = true.

On the keyup even, check if the key which was released is the same as value
of state variable. eg. state = "Moving Up" and "KeyCode= <value of up
arrow>" set moving=false.

Create a timer, which fires at short interval. if moving = true then move
your spaceship depending upon the value of the state variable.

Hope this helps !

Akhilesh Agarwal


Quote:
> Ok.  I am making a space game and I want to move the spaceship
> flawlessly without delays and Repeat Rates from the Keyboard.  Is
> there any way to Illiminate the Keyboard Delay and Keyboard Rates with
> VB5 CODE in my game...

> Tony




Wed, 27 Feb 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to set keyboard repeat/delay rate?

2. Modifying Type-Matic delay and rate with BASIC ?

3. Keyboard Type Repeat Rate

4. changing keyboard repeat rate from QB

5. Keyboard cursor rate

6. Keyboard cursor rate

7. How to slow down keyboard acceptance rate?

8. How to disable mouse/keyboard events ? pls help

9. Keyboard delay

10. Keyboard delay

11. Changing Keyboard Delay in VB 6.0...

12. HELP!! need non-std baud rates

 

 
Powered by phpBB® Forum Software