Page 1 of 1

PostPosted: Sat Jul 23, 2005 4:10 pm
by Int21h
When programming a game and using the keys to move (with event() or Fevent()) there is a delay after the key is first pressed of about a second before the character continues to move. For instance, when you press and hold the key to move left, your character would move one space left, wait about a second, and then move quickly left. Another problem with this is if you hold a 'move left' button and then press a 'jump' button, there is a delay as the keypress queue gets rid of all the 'move left' characters and finally hits your 'jump' character. In the old days you could set the key click delay so that right when you pressed and held a key it would immediately start moving and continue to move. Does anyone know how to overcome this? Maybe the second problem could be fixed by flushing the key() queue?

PostPosted: Sun Jul 24, 2005 1:50 am
by jstadolnik
Use the PToolboxLib's NoKeyEvent() and checkKey() functions to get around this.


The PToolboxLib guy.