Is it possible to implement a fortune of wheel?

I decide to implement a fortune of wheel in my experiment. And there is an arrow at the centre waiting to rotate when the participant choose the wheel A or the wheel B to gamble. For the feedback frame, I am going to highlight the choice A or B with possible outcome depending on the final location of arrow. The picture below shows the original experiment design, and my question is that is it possible to implement a fortune of wheel? Or should I refer to another editing programme. Thanks much in advance!

It is possible, but it will require quite a bit of programming and effort.
As much as I am aware, no “experiments” platform offers this kind of component. You might try to find a way to achieve it using game engines such as Unity or even Construct, but I don’t think it will be less complicated; it might even be more challenging. I think Psychopy is your best bet.

So, if you ask for an easy way to do it in Psychopy, I’m afraid it won’t be that easy (like choosing a component and changing some variables).

My approach would be something like this:
First of all, we will have a component which is the actual wheel, for example:
image
Then, we will have another component that will represent the pointer:
(You can ignore the cyan lines, they are there to emphasize it’s located at the center of the wheel)
image
The trick with the pointer is to set its anchor point to the bottom (or the middle of the wheel):
2dec86540f28f2ea97cfa3e33163134e

All those stuff can be done pretty easily in Psychopy.
I used photoshop to demonstrate my approach, in case you got confused.

Understanding how to make the spin would be the trickiest part (understanding how to make the angle change over time in a spin-like way).
Then, we need to create a function that triggers each time the participant spins the wheel. The idea is to change the orientation of the pointer according to the function. That way, you will get the spinning effect and current angle.
When the spin stops, you retrieve the current orientation of the pointer (in deg). In the example above, if the angle is between 0 to 180, the result is blue. Otherwise, the result is red.

Using this approach, you can create multiple variations of wheels.

I hope it helps :slight_smile:

1 Like

For the spin I was thinking about measuring the speed of a mouse swipe and then using that to give the pointer an initial speed. I’d then add a drag factor to slowly reduce the speed.

I did something similar with my Ebbinghaus Darts experiment in 2020

1 Like

Sounds like a great approach. I would also consider adding a randomized variable, so the participant won’t learn which speed causes which part of the wheel as the answer.

1 Like

Here is my new Wheel of Fortune demo. The random factor could be the inertia value. Try numbers around 95 for a decent spin.

Code - https://gitlab.pavlovia.org/vespr/wheel-of-fortune

Try it - https://run.pavlovia.org/vespr/wheel-of-fortune/

1 Like

Hey,
Just curious, are you able to spin it? It looks like that for me:


Unless it’s not animated, which makes sense.

Chen

The default inertia is 0. Try 95 (in expInfo dialogue)

Also, I’ve just been fixing a bug, so check you have the latest code

2 Likes

I actually missed the expInfo dialogue, the habit of testing many experiments…
Nice! It looks really well done.

2 Likes