psychopy.org | Reference | Downloads | Github

General assessment of online capability

I could be wrong here, but judging from the kinds of questions that are being posted, it seems to me that, while Psychopy3 experiments are good, their translation into online experiments often doesn’t work without significant alteration of the code. Is this a fair assessment?

To be fair the automatic translation from Python to Javascript is less than four months old.

I’ve managed to code an experiment which involves throwing a dart at a target with animation with very little Javascript knowledge. I had to draw the animated dart with polygons rather than use an image in order to avoid memory overload issues on a mobile device.

Apart from that, there are some common mistranslations that are easily fixed and a few things that are particularly tricky. I haven’t tried sound myself, but I’ve had lots of problems with it with standalone PsychoPy over the years so it wouldn’t surprise me if getting sounds working correctly in the online version is challenging.

Best wishes,

Wakefield

It really depends what you’re trying to do. If you have an experiment that uses a lot of code components, you need to be careful about how they are translated and there are some limitations on what you can and can’t do. If you don’t use code components, or use very simple code components, it should almost always work perfectly without any changes. There are a few issues with audio and video (videos need to be mp4, audio is usually best if it’s .wav, but some browsers are bad at audio in general), but browser audio/video is always tricky.

Also keep in mind that you’re seeing a very strong sampling bias here. This is where people come when their study doesn’t work, not when it does. I don’t know what proportion of the overall user-base this represents.

1 Like

This morning I wrote an experiment from scratch. It is a simple dot probe but uses code to shuffle three arrays, Excel for conditions and presents images.

Once I had the local version working, the online version worked first time, since I preempted my expected errors with a JS code block containing

shuffle = function (a) {
    return util.shuffle(a);
}
thisExp=psychoJS.experiment;
win=psychoJS.window;

Best wishes,

Wakefield