Drawing delay with conditional branching?

URL of experiment:

Description of the problem:
Hi all, I’m running a reaction time experiment where I control sequences like [1,2,1,1,…] and each element either displays a right or left circle, and people press right or left arrow keys. I do it with a slightly weird conditional branching where in one routine, one circle is opaque and one circle is transparent with an outline, and vice versa in the other routine. The value of the item in the sequence (1 or 2) controls which routine displays. In Psychopy, it looks fine. In Pavlovia, it runs the same, but somehow the drawing causes flickering. Any suggestions? I’m doing the conditional branching in this slightly clunky way because of difficulties assigning transparency.

Thanks!

When exactly does the flickering happen? Is it when two stimuli are presented in succession?

So basically the stimulus appears, the person reacts, the ‘background’ routine is called for 120 ms, and then the loop ends and the next stimulus appears. The background routine flickers/ redraws in Pavlovia but not psychopy.

I took a look at your experiment and I think know what you mean with flickering: between routines the circles and the arrows are not shown for a brief amount of time. Have I got this correct?

Also, I see a stimLeft, stimRight, and blankscreen. I haven’t examined your algorithms very closely, but did I guess this right as well? Per trial, either stimLeft or stimRight presents stimuli, followed by blankscreen.

Yes ! you have it right !

Check. I’ve got two hunches:

  1. Skipping of one of the two routines (stimLeft and stimRight) takes a frame, that’s why it flickers. Could be fixed by changing the procedure such that you’ve got one routine that acts like stimLeft or stimRight depending on the trial.
  2. Drawing a circle as a polygon with 200 vertices could be a bit heavy on our graphics engine. Maybe replace it by a PNG of a circle?

So I tried both of these things, and then altered the order of the components within the routine around and it worked in the end. Thanks so much!

1 Like

You’re welcome :slight_smile: