My keyboard is responding too quickly (or DBP is storing the input for a fraction too long), so I'm hoping there's a way I can clear out the buffer.
As my game starts, a splash screen is displayed, and I use the following code to advance:
if (timer() >= gCurrentTime1#+4100 or scancode() > 0 or mouseclick() > 0)
This will wait just over 4 seconds, or for any key press or any mouse click before moving on and displaying the menu. In the menu I have this code to detect a press of the space bar to start the game:
If I click the mouse or press any key apart from the space bar when the splash screen is displayed, I get to the menu. If I use the space bar to advance the splash screen, it clears the splash screen, whips me through the menu and straight into the first screen of my game.
I don't really want to insert an artificial wait between the menu appearing and when keypresses are recognised, but there must be a way to stop DBP accepting a key press on the splash screen and actioning it on the menu screen.