Best ways for measuring reaction time

Get help using Construct 2

Post » Tue Mar 06, 2012 8:01 am

Hi all,

I have a game concept in mind where the player is scored based on their reaction time to the appearance of a certain sprite. I understand though, that some HTML5 games will run at a higher frame on better systems (and slower on older systems).

My question I guess is: what do you think is the best way to measure reaction time that is fair to all players?

Should I have a time that normalizes the score output dependent on the average fps?

Would wall clock work? since this is frame-rate independent...? I ask because I'm not sure about the mechanics. would the sprite be visible quicker on a faster system and be delayed on a slower system?

I'll experiment some more but I don't know how to test this very well.

Thanks in advance
B
11
S
3
G
2
Posts: 12
Reputation: 2,049

Post » Tue Mar 06, 2012 8:03 am

Count the ticks between the two events and multiply it with the System-Variable dt
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Tue Mar 06, 2012 8:11 am

wow thanks for the speedy reply.

would this method start counting from the moment the sprite becomes visible to the player?

if so - then you've helped me out completely! Thanks

i'm a beginner at all of this :)
B
11
S
3
G
2
Posts: 12
Reputation: 2,049

Post » Tue Mar 06, 2012 9:15 am

After spawning the sprite, take a global variable and set it to tickcount.
Then, at keypress, take the tickcount again. After that use the following to calculate the reaction time:

[code]Reactiontime = abs(t1 - t2) * dt[/code]Weishaupt2012-03-06 09:19:22
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Tue Mar 06, 2012 6:31 pm

If you use time instead of tickcount you can calculate it as follows:

[code]Reactiontime = t2 - t1[/code]

which is more accurate because each tick doesn't necessarily have the same dt.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Wed Mar 07, 2012 4:07 am

thanks R0J0hound. I have been experimenting with the dt thing, but the computers I'm using are about equal in performance.

I have seen that the dt does vary when the frame-rate drops (I used the particle effect to bring down the frame rate).

Will try out the time and post the results :D
B
11
S
3
G
2
Posts: 12
Reputation: 2,049

Post » Wed Mar 07, 2012 8:50 am

@Spirantula: something that interest me is how do you define reaction time ?
From what point do you start counting ? Display of something ? Time between two touches ?
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed Mar 07, 2012 11:32 am

@Pode, for my purposes the reaction time is measured from the display of a sprite until the player reacts (does some kind of input - maybe clicks the mouse).

I raised the question because I was not sure whether C2 would start counting from the moment the sprite displays (becomes visible to the player) or before that - for example if it has an extremely low frame-rate and the sprite display is delayed somewhat (maybe 5 ticks go by without any sprite visible - but it starts counting from there anyway)

not really sure if this makes any sense.
B
11
S
3
G
2
Posts: 12
Reputation: 2,049

Post » Wed Mar 07, 2012 10:45 pm

[QUOTE=Pode] @Spirantula: something that interest me is how do you define reaction time ?
From what point do you start counting ? Display of something ? Time between two touches ?[/QUOTE]

For me, i measure the reaction time as the time my object is created and the time the player clicks on it. Assign the time on creation to an object's variable and i'm good.

And by the way, i use it to compound the points for clicking the object, within the speed and distance of origin... (on ClickDaMeme, for the memes puked/clicked)
English is not my native language. Sorry for any mistakes and feel free to correct me if needed.
B
14
S
5
G
3
Posts: 110
Reputation: 3,225


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests