Construct 2 in a research environment

Discussion and feedback on Construct 2

Post » Mon Mar 12, 2012 12:22 am

Hello, comunity .

I'm a neuropsychologist. I study brain and cognition. A neuropsychologist's main weapon in study, are the psychological tests.

Yes, you may have seen some psychological tests online. Forget about them. We work with precision and scientific validation. If there is no evidence, it's not worth using. And if the evidence is weak, we must polish the test.

I chose construct 2 because it's awesome. And easy to use. But i'm very worried about one thing: The timer's precision.

How precise is the timer in construct 2? It's known for us, psychologists, that a 2ms difference is a difference that cannot be ignored.

So I ask you... How precise is the timer in Construct 2? Should I use it for research? Keep in mind that the precision cannot be too oscilating. I know that there are a lot of factors involved, like responsiveness of the keyboard and the computer's processor. But i'm not a programmer, so I don't know it for sure. Can you please explain it to me, or give some reference? (it VERY important for me)

In a matter of information, there is only one scientific article showing that Flash's timer precision is reliable for research propourses, so, to make your life easier, you may tell me: Is Construct 2 more reliable than Flash in this aspect?
B
6
Posts: 56
Reputation: 712

Post » Mon Mar 12, 2012 12:33 am

As I know, (less then) 2ms is hard to reach, even in os timer.
You might need a special hardware or using a hard-real time os, I guess.

Maybe I'm wrong.
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Mon Mar 12, 2012 1:26 am

Contruct 2 currently can't work above 60fps. That means, at best, you're going to be working in about 17ms 'steps' per frame regardless of the accuracy of the input with the keyboard.

I would recommend construct classic for this task. It has an 'unlimited' mode where the exe runs as fast as possible. My computer is nowhere near top of the line and it gets about 4,000 fps using this method with a blank .cap, and I seem to recall someone mentioning getting over 10,000 fps. If you keep the content and code simple and keep all unnecessary code deactivated, hopefully it would be fast enough for you.

Construct classic also has a very high precision timer in its 'profiler' plugin. Use that and the unlimited mode together to get high precision data.

Keep in mind though that the larger the window, the more pixels the graphics card will need to redraw. Keep the window small and deactivate as much code as possible to keep the fps high.

At 5,000 fps, you're getting a precision of about 0.2 ms per step, which I hope would be adequate. If you want faster than that, you're probably going to have to use something else like raw C++.Arima2012-03-12 01:38:32
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Mar 12, 2012 1:53 am

I should explain - the timer in the profiler can work, far, far faster than the framerate in much smaller bits of time than 0.2 ms. However, I'm not quite sure how to set something like this up properly because in unlimited mode, the graphics card is probably going to be the bottleneck and the cpu might end up waiting for it to draw to the screen, as there's no way to decouple running the logic from rendering.Arima2012-03-12 01:54:56
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Mar 12, 2012 2:14 am

Excellent answer, Arima. Thanks a lot. Is it possible that construct 2 will get a plugin wich does the same thing that construct classic does?
B
6
Posts: 56
Reputation: 712

Post » Mon Mar 12, 2012 2:22 am

I doubt it, Construct classic is a entirely different category. C2 is an HTML 5 game editor (WebGL), while Construct Classic relies on your system rather than your browser. Someone else can explain this much better than I can, but I think that gets the point across.
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Post » Mon Mar 12, 2012 2:27 am

I'm not sure. I think it would probably need to be coded into the program itself, but you could post in the plugin development forum asking if it's possible, or wait for an answer here from someone more knowledgeable than I about plugin development.

Even if C2 gets the ability to run logic and render faster than the screen refresh though, it won't be as fast as construct classic, because C++ is far faster than javascript. Also C2 currently lacks a profiler with a high-resolution timer.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Mar 12, 2012 3:32 am

Hey Zerei,

Are you planning on doing all this testing on one machine? or are you looking for software to be loaded on many computers to test in groups?

I would have thought that using Dt in C2 would be sufficient for this (as it is supposed to be the same time regardless of computer speed right?). Maybe im missing something here.

Edit: just did a little research, seems like dt is affected by too many factors (if only slightly). Unless you intend to do a study on the accuracy of C2's or CC's timers first, I would use the flash timer to be honest.GenkiGenga2012-03-12 03:44:39
ImageImage
B
74
S
17
G
6
Posts: 1,039
Reputation: 10,605

Post » Mon Mar 12, 2012 11:42 am

@Zerei : I worked with users' reaction time on computers, during my PhD. No Javascript can give you a timer more precise than 4 ms, it's in the W3C specification. Only the Chrome, 1st build used a 1 ms timer (which made the CPU getting hot like crazy). Keep in mind that on any OS apart from QNX and RTLinux, when you set a timer resolution, it's an at best promise from the OS. For example, on Windows below win7, you won't get anything below 10 ms in real world usage.
For your reaction loop : frame display = 16 ms (at 60fps) + eye processing, arm movement and finger click on mouse/keyboard ~= 150-200 ms + USB port rate, at 125 Hz = 8 ms + OS HID stack processing ~= 1 or 2 ms (depends on what's the CPU's doing at that moment => IRQ interruption mechanism) + next frame updated onscreen = 16 ms...
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Mon Mar 12, 2012 11:57 am

[QUOTE=Arima] Contruct 2 currently can't work above 60fps.[/QUOTE]
I don't think that's true, Ash told me somewhere that the 60 limit is dependant on refresh rate so if you have a 120hz monitor it could go higher than 60.
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests