[gameprogrammer] Re: Key Repeat problem
- From: Simon Mihevc <simonmihevc@xxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Fri, 20 Jan 2006 13:41:07 +0100
The flaw with this, as I mentioned, is that if the player holds down a
key, then with so many keypress/release events being fired for the
duration it is held down, the key might not be marked as being pressed
at the time when the keys are being processed in the main game loop.
iirc an average keyboard allows/is able to transmit keypresses for at
most 6 or 5 keys at once. That's 6/5 events every few ms although it's
very unlikely that more than 2/3 keys will ever be pressed at the same
time.
I'm pretty sure java could handle this(or correct me if not). And
even if the event wasn't processed immediately after it happens in the
main game loop it would be in a few frames, although I still doubt it
wouldn't be handled before that. And the player wouldn't notice the
difference.
With c++/SDL you also get a plethora of key events every few ms
however you can handle all of the events there before you do the
drawing, ...
Cheers, Simon.
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: Key Repeat problem
- From: David Olofson
- References:
- [gameprogrammer] Key Repeat problem
- From: Stephen Smith
- [gameprogrammer] Re: Key Repeat problem
- From: Paul Smith
- [gameprogrammer] Re: Key Repeat problem
- From: Stephen Smith
- [gameprogrammer] Re: Key Repeat problem
- From: Simon Mihevc
- [gameprogrammer] Re: Key Repeat problem
- From: Stephen Smith
Other related posts:
- » [gameprogrammer] Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
- » [gameprogrammer] Re: Key Repeat problem
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] Re: Key Repeat problem
- From: David Olofson
- [gameprogrammer] Key Repeat problem
- From: Stephen Smith
- [gameprogrammer] Re: Key Repeat problem
- From: Paul Smith
- [gameprogrammer] Re: Key Repeat problem
- From: Stephen Smith
- [gameprogrammer] Re: Key Repeat problem
- From: Simon Mihevc
- [gameprogrammer] Re: Key Repeat problem
- From: Stephen Smith