Description of the problem: I am trying to run an online experiment, in which participants will see different animations of an image moving from the left side of the screen to the right side at different velocities.
Since the object will move at different velocities, depending on the condition, I have created several Excel files where I have defined a list of values. What the code does is that it updates the location of the object in every frame using the values from the Excel file, so it looks like the object is moving from left to right.
The experiment works, and it runs smoothly with the Builder.
My problem is when I upload the experiment to Pavlovia: the object moves unusually slow, and there’s a lot of jitter. Any idea of how to avoid this?
Perhaps you could move it twice as far every other frame. It sounds like you are doing just too much for Pavlovia to cope with within one refresh.
Personally I would set up a variable called animationRate and recode it so that the positions only change every animationRate frames and the distances travelled are multiplied by the same number. That way you can test multiple different values by just changing one number until you work out the optimal value
I’m currently trying to get a very similar experiment set up in Pavlovia! But I’m having translating our initial code for the animations (in Python) to JS. I would really appreciate it if you got the chance to share your code for moving images across the screen in online experiments.