We developed the game in Unity, using two assets from the Unity Asset Store. - the Unity Tobii Eye Tracking SDK and the Water2D fluid simulation asset. We customised the Water2D asset to meet the requirements of our game and we also extended the functionality of the Tobii Eye Tracking SDK with the Eye Tracking 2D Package, which we have submitted to the Unity Asset Store. More information about this asset can be found here.
Main Technologies
Unity was used as the development platform for the game.
The C# scripts to implement the behaviour of GameObjects were written in Visual Studio Code.
The Tobii Eye Tracker was used to collect eye tracking from the user.
The Tobii Eye Tracking SDK was used to receive the eye tracking data from the eye tracker and to transform the data into a more usable format.
Eye Tracking 2D used the input data to enable eye tracking functionality for 2D Game Objects. Eye Tracking 2D allowed us to detect which GameObject is being gazed upon and to then perform the appropriate game action.
System Architecture Diagram
The Tobii Eye Tracker captures gaze point data from the user and passes this data to the Tobii Eye Tracking SDK, which makes the data accessible through its API.
This data is accessed by Eye Tracking 2D to determine whether an object is currently being gazed upon by a user. Alternatively, mouse input can be used to select an object. The GameManager class holds the current state of the game as a whole and controls each of the main functional concepts of the game for example, the Water Simulation, Pipes and the UI of the game.
Additional information about the game's scripts and class diagrams can be found here.
Implementation of Key Functionality
We have implemented full support for both eye control and mouse control to increase accessibility for users. We have implemented this by adding a Collider2D component to each object and then writing a script that controls the functionality of the GameObject when a mouse click is registered (OnMouseDown). The Eye Tracking 2D asset enables us to then use the Collider2D component to determine whether the user is dwelling on the game object, so that the appropriate methods can be called when a successful gaze selection has been made.