med-material / Whack_A_Mole_VR

Whack-A-Mole in VR
MIT License
3 stars 15 forks source link

Implementing Time-based Color Gradient on Moles #256

Open mrvilix06 opened 1 year ago

mrvilix06 commented 1 year ago

The issue https://github.com/med-material/Whack_A_Mole_VR/issues/238 suggests a generic approach to modifying user feedback within the game.

Building upon this, the objective of the current issue is to carry out the first iteration on the feedback system by implementing a color gradient on the moles . The change in color will be based on the time the user takes to interact with them.

MoleGradiant

Details :

Color Gradient Feedback: The initial color of the mole should be light green, and it should gradually shift towards darker shades based on the delay of the user interaction. The longer the user takes to hit the mole, the darker the color should get.

Gradient Timing Details: Based on testing, users generally take between 1.6 to 2.4 seconds to click on a mole. To accommodate for a wider range of interaction times, the gradient color change on the moles will be set to reach its darkest shade in 5 seconds. This will ensure that the feedback is noticeable even for slower reaction times, while not being overly aggressive for quicker ones.

Color Gradient Function: We need to create a function that generates a smooth color gradient from the mole's initial color to a darker shade over a period of 5 seconds. This could be accomplished by using a linear interpolation (lerp) function that calculates the color value based on the elapsed time since the mole appeared.

Mole Appearance and Timer: When a mole appears, a timer should start. This timer would track the time elapsed since the mole appeared and would feed into the color gradient function to determine the color of the mole.

Enhancement:

As an additional signal to the user about the time elapsing, we could include a feature where the edge of the mole starts to shake when the timer nears its end. This shaking could increase in intensity as the timer gets closer to 5 seconds, indicating the mole is about to become fully dark and perhaps disappear. This visual cue would provide players with another sign of urgency to hit the mole quickly.

hendrikknoche commented 1 year ago

regarding the timing it would be good to look into some data from patients and get a good understanding of the distribution of the hit delays. Potentially should this time also adapt depending on user performance. (from previous sessions and or within a session)

bastianilso commented 1 year ago

Thanks for creating this issue stephane! I like your ideas here and I think we should keep them on the roadmap for Whack-A-Mole. However, the intended starting point proposed in issue #238 was this: color-change-by-reaction-time

Once we have this basic feedback, we can explore other feedback ideas, for example this gradual shifting idea you show. Eventually we will create a large map of feedback types, where we can theorize about their influence on people's behavior and compare that to task measurements in the final study. 😊

bastianilso commented 1 year ago

regarding the timing it would be good to look into some data from patients and get a good understanding of the distribution of the hit delays. Potentially should this time also adapt depending on user performance. (from previous sessions and or within a session)

I agree.

@mrvilix06 what you can do here is for example this:

We will need to also define the expected behavior in the beginning of the game, when no/few measurements have been taken. For example, we may want to provide some "average" level of feedback intensity, until we have the first 4-5 moles hit.

bastianilso commented 11 months ago

We agreed to extend the visual way moles react also to scale as well.

color-change-by-reaction-time-scale

bastianilso commented 11 months ago

@mrvilix06 the scale values used here are 115% - 150% of the moles default size.