Line invisible in pavlovia(seeing like a brief flash )

I am currently having an issue with transferring my experiment to Pavlovia. It’s a line reproduction task, that works locally but lines seem invisible in Pavlovia.

I tried adding a text component and show the line lengths as a text-
now I can see the text in the experiment but still can’t see lines even if I changed their width from 2 to 5.

I also tried changing spatial units to make it visible- in pixels I don’t see anything but in most of the units (norm,height etc)I only see just 1 line in brief duration like 500 ms.

I get the line lengths from a spreadsheet as you see but I also tried removing that and entering random numbers like 32 for the first trial and 97 for the response trial, - cursor starts at the last response trial’s length when I did it like this(I want cursor to move simultaneously with the line.)

and when I just changed the target_line(response trial) cursor didn’t move simultaneously with the line.

I just tried a rectangle- as I made the width bigger ( first I started with 2,5 and 100) I am able to see it on screen only for like 500 ms maybe less than that and its just 1 rectangle**
again it works locally but I don’t see anything online just grey screen

I also just tried with a triangle- I don’t get an error:

How can I fix this?





Hi There,

For online use i would recommend:

  1. use height units (this will scale appropriately to all screen sizes)
  2. use a rectangle rather than a line
  3. set the width and height of the rectangle separately. I see at the moment that you are using a variable line_polygon_pixels (perhaps fed in from a column in a spreadsheet). instead I would suggest having two columns line_width line_height start testing that using values like 0.05 for width and 0.2 for length (5% of screen height ant 20% respectively, this will make a horizontal line) from there you can adapt the values used for width and height appropriately for your experiment.

Hope this helps,
Becca

Hi, thank you. For some reason now cursor won’t move simultaneously and I am seeing a rectangle. Did I get that wrong?

Thanks!





I also changed the name for the size"currentline"(it was the random line length column in the spreadhsheet that will be shown in response trial) to "line_height "so code looks like this:

But now I get…: UnboundLocalError: local variable ‘line_height’ referenced before assignment



Hi, I created a new spreadsheet like this both for the display and the response trial, I also changed the orientation from 90 to nothing and entered the size the name of the colunns like this: [line_rect_len,line_rect_width] but still didn’t work. Do you have any idea why this is happening


? We don’t get errors.
@wakecarter

Hi There,

Given the spreadsheet that you have you want to update your target_line component to look like the below

  1. so that you are using both current_line_len and current_line_width to set he line.
  2. set the line size every repeat
  3. use height units not pixels in your spatial units.

I think the current reason your line is invisible is because your units are pixels and 0.0001 of a pixel is too small to present.

1 Like