Ultra-precise "who pressed first" timing query
I'm working on a local multiplayer game. One of the mini-games has single button controls and it basically hinges on who has the better reactions.
Effectively, after random period of a range of 1 to 5 seconds, an object appears and the first to press the button gets the powerup. There's a penalty for pressing 'early' too.
What I'm doing at present to handle this is:
1.Upon pressed any key - Activate group "Key Pressed"
2. Group "Key Pressed"
2.1. P1 Button Pressed - Activate group "P1 won", Deactivate group, "Key Pressed"
2.2. P2 Button Pressed - Activate group "P2 won", Deactivate group, "Key Pressed"
Normally, for most games, people wouldn't worry about a ~17ms (1x 60th second) window being too wide, nor the inherently unfair nature of the above meaning that if P1 and P2 pressed the button at *exactly* the same, in each case, P1 would be declared winner as their 'button checking' event occurs first?
I suppose I could make a check so that if in the same frame both buttons are pressed, it does a "draw" (which I don't really want), or randomly selects a winner.
Usually, I'd say people were "splitting hairs" with worrying about these edge cases. As it's only a single button in this game, they'll be watching and waiting for it: IE there's no 'lag' from moving fingers to reach another key. In this context, the whole nature of the game is that players will almost always at 0.2-0.3 seconds after the powerup appears, hit the button.
Therefore, as a "scale", 100ths of a second start to look like they're lacking in granularity: You could reasonably expect a draw 1 in 10 times.
Therefore, is it possible to improve on this further (if so, please explain how!), or am I at the limits of what it achievable?
How do really competitive games that support 'pro gamer tournament play' (say, Streetfighter IV), which have incredibly precise timing requirements deal with the above scenario "under the hood?"