My current game, Pegz3D, uses the keyboard arrow keys for navigation. However, I need to have it so when you tap the down arrow once, the game recognizes it as *one* stroke. When I run the game and tap the down arrow, it recognizes it as a bunch of down strokes, like 20.
Anyways, I fixed the problem by using a simple boolean keyPressed flag so the engine only executes one key at a time. Is there anything I'm missing here or is this normal?
I'm thinking it's normal because as humans it's impossible for us to press the key once in, say 40 milliseconds, which is my sync time. The game is simply following directions and recognizing I'm pressing the key over several syncs. Any other insights?
Thanks
http://www.automatongames.com/