SR Research Support Site
Experiment Templates Overview

The fastest way to start developing EyeLink experiments is to use the supplied templates included with the EyeLink Developers kit. Full source code is supplied for each of several experiments, each illustrating a typical experimental paradigm. You can copy the template's source code to a new directory and modify it to quickly create your own experiments. A detailed analysis of the operation of each template's operation and its source code is included in the following section.

Template Types

Each template is stored in a subdirectory of the C:\Program Files\SR Research\Eyelink\SampleExperiments\sdl folder and in "C:\\Users\\Public\\Documents\\EyeLink\\SampleExperiments\sdl" folder for project modifications or re-compiling. Before compiling or modifying any of the templates, read the section "Programming Experiments" carefully. Be sure to follow the guidelines on copying files and creating new experiments. In particular, be sure to copy and rename files and folders, and do not modify the original template!

The templates are described below:

simple The basic experiment template, which is used to introduce the structure of all the templates. The graphics in this experiment are drawn directly to the display.
text Introduces the use of bitmaps. It displays 4 formatted pages of text.
picture Similar to text , but displays 2 pictures (JPG files).
eyedata Introduces the use of real-time link data. It records while displaying a gaze-position cursor, then plays back the data from the trial.
gcwindow Implements a fast gaze-contingent window. This is demonstrated using both text and pictures. Full source code for the gaze contingent window is included.
controlUses gaze position data to select items from a grid of letters. This can be used to develop computer interfaces. The code for selection is longer than usual.
dynamicUses refresh-locked drawing and moveable targets to implement sinusoidal smooth pursuit and gap-step-overlap saccadic trials. The code for selection is longer than usual.
broadcastTemplate for an application that eavesdrops on any application, reproducing calibration targets and displaying a gaze cursor (if real-time sample data is enabled).
comm_listener and comm_simpleTemplates that illustrate a dual-computer experiment. The comm_simple template is a modified version of the simple template, which works with the comm_listener template. This illustrates how real-time data analysis might be performed, by reproducing the display (based on the TRIALID messages) and displaying a gaze cursor.

The discussion of the "simple" template must be read before working with any of the other templates, as it illustrates most of the shared code for all experiments. In general, you should read through all of the templates before beginning programming, as each section assumes you have read the all previous sections.


Copyright ©2002-2023, SR Research Ltd.