Skip to content

whereswally implementation

teunvg edited this page Oct 19, 2017 · 1 revision

Where's Wally implementation details

General guidelines

We decided during our meetings that:

  • We would use Unity, because of its cross-platform compatibility
  • We would use the BCI buffer to log events, for integration with EEG, eye tracking and motion tracking
  • We would (at least initially) default to a task more congruent with existing literature, using Landolt C stimuli rather than an actual "Where's Wally"-like scene (although during the implementation we keep this option in mind)

Generally, we came to the conclusion that:

  • We wanted to try to incentivise participants to perform motor actions quickly (in a natural way), to prevent continued searching while already moving
  • We needed minimum target-to-target and stimulus-to-stimulus distances, to prevent distractions or influences from neighbouring stimuli
  • Slowing down participants during the task might be necessary in order to allow proper (isolated) identification of response signatures
  • We would want participants to indicate the end of a trial themselves
  • Instead of a score, we would want to provide feedback on performance between trials

Experimental setup

Once the experiment is started, first a screen is shown where the participant can indicate when they are ready by pressing (and holding) the fingerprint icon in the right-bottom corner of the screen. When they do this, a target cue will be shown for one second, after which the experiment starts. This screen will be shown before each trial. During a trial, on the left side of the screen a number of stimuli are shown, some of which are targets. On the right side, a checkmark icon (top) and fingerprint icon (bottom) are shown, for ending the trial and resting your finger on while searching, respectively. When the participant lifts his/her finger from the fingerprint icon, all stimuli will be masked using a questionmark icon, to prevent simultaneous movement and searching. The participant's goal is to tap (and briefly hold) each target in the scene one-by-one, and then tapping (again briefly holding) the checkmark icon to indicate that they are done. Stimuli turn a lighter shade of grey when tapped, but remain masked until the participant is pressing the fingerprint icon again. The pressed stimulus will then turn green if it is a target (hit) or red if it is a distractor (miss). Only one stimulus can be tapped at a time. After the trial has ended, a screen with a performance cue is shown, giving feedback to the participant about what aspect of the task they could improve at. The participants can then go to the begin trial screen (or end experiment screen) by pressing the checkmark icon again in the top right corner of the screen. There are two experiment modes: standard, where all stimuli are shown simultaneously, and serial, where they are presented one-by-one.

Implementation details

The experiment is written in Unity, using the 2D game API. There are several assets in the project:

  • Sprites
  • Misc
  • Prefabs
    • HomePad -- fingerprint button in right bottom of the screen
    • CheckMark -- trial complete and next trial buttons
    • LandoltC -- stimulus object
    • Trials -- Trial controller presets
      • EasyTrial
      • NormalTrial
      • BigTrial
      • SerialTrial
  • Scenes
    • Menu
    • TestExperiment -- a test version of the experiment
    • SerialExperiment -- a serial test version of the experiment
  • Scripts
    • Main scripts
      • ExperimentManager -- manages a full experiment: transitions, keeps score, manages UI, spawns TrialManagers, logs events
      • TrialManager -- manages a single trial: generates stimuli, checks participant actions, logs events
      • Stimulus -- manages stimulus properties and events
      • EventLogger -- a singleton class used for logging (currently to debugging stream, but built to be extended with BCI buffer support)
    • Auxiliary scripts
      • RandomExtensions -- extends System.Random to include an array shuffle function
      • SceneController -- for main menu

Clone this wiki locally