I am wondering how I can make my program not keep looping the input of a key or mouse click.
For example, I'm writing a game that uses WASD keys for movement of character, and say spacebar to jump.
How can I have it work so that regardless if I quickly tap space or whether I hold it down, it will only iterate the jump once?
I have it programmed basically as "if (key[KEY_SPACE])..." in my main game loop.... but I want to to actually wait for another, second keypress before executing whatever commands...
Is my question clear?
Thanks!