Question

I've made a game where the task is to press spacebar 100 times which is mutiplayer, People are starting to use simple applications which spam the key "space" and I'm wondering if there is a way to only listen for user input or detect programs which are emulating key events.

I've not tested one of these programs but my program listens for KeyUp event.

Just tested: They can emulate key presses

Was it helpful?

Solution

Best bet is to see if the time between all the spaces are exactly the same. A human would likely have some kind of variance. Make a judgement over some period of time.

OTHER TIPS

One big gotcha: All they need is to solder an oscillator to a donor keyboard and then it's not even visible inside any of the computer's processes. Sounds like a lot of work but you'd be surprised how hard people will work to cheat. Detect this with timing checks as mentioned above. Not a whole lot of people know how to make spread-spectrum clocks.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top