Hi all,
I made a game that is played by using one’s reflexes.
It works just fine on PC, but gives slower values on the tablet.
Basically an object moves up, and as soon as it changes colour, one has to click.
It work like this:
I have a little algoruthm that takes the FPS dynamically into account (at the beginning of every frame) and thus calculates the object’s speed, so it moves evenly. I set it that it should need 1.5 seconds to go up. I test this with a printstring, and it works fine, 0.01-0.02 seconds ± so accurate enough. The tablet shows this as well.
When the player clicks, the current height is stored RIGHT AFTER the press. That way, knowing the object’s speed and its height difference we can calculate the reaction time after the game is finished.
The issues is that on PC I get values like 0.11, 0.12, sometimes 0.08 and so on (old pc gamer I am). However on the tablet these values are like 0.3, 0.27 and so on, MUCH slower values.
Please note that on tablet the button is activated by PRESSED, not clicked. So it takes the FIRST touch into account, and not the release.
I have a hint that I have a time that my finger is down, so the button is held down and it still takes the LAST moment into account when the button is touched. Am I right? If so, how to get around this, so that it saves one value right when it is pressed, then only can save another value when it is released?
Thanks in advance.