I'm proud to present a new, great feature for Empire Earth 2: Support for Tobii Eye Tracker devices, available since Unofficial Patch 1.5 (version 157026, December 2019). This is a non-sponsored article, and it wasn't created to advertise Tobii devices. It's because I programmed it to work with EE2 for myself, and I want to share it with the other players who use Unofficial Patch 1.5 and Tobii Eye Tracker.
What are Eye Tracker devices?
An eye tracker is a device for measuring eye positions and eye movement. Eye trackers are used in research on the visual system, in psychology, in psycholinguistics, marketing, as an input device for human-computer interaction, and in product design. Source (click).
Requirments in order to use Eye Tracking in EE2
1. You need to own a Tobii Eye Tracker device: https://gaming.tobii.com/products
2. You need to have the "Tobii Eye Tracking Core Software" installed: https://gaming.tobii.com/getstarted/
3. You need to update Unofficial Patch 1.5 to version 157026 or newer: https://ee2.eu/patch/
And that's it! The UP1.5 Launcher will detect if all required components are present/running, and will start an optimized thread which will do all the work for you, without the impact on performance!
How does the Eye Tracking work in EE2?
The base concept of this feature was to make an Eye Tracker device useful, helpful, and not annoying during game. It has been programmed especially for EE2, considering exclusion of the User Interface to not interrupt gameplay, sleep times before camera starts moving (unique for each border/corner), and much more. The only purpose of this feature is moving the camera by simulating arrow key pressess, depening on the current gaze point. The Launcher detects if the game window is active, to not cause problems when the game is minimized. Everyone has personal preferences regarding border thickness, time before camera starts moving, etc. Understanding that - I made this feature fully customizable, by the UP1.5 Configuration file. An instruction can be found later in this article. It's worth to mention, that the default Eye Tracking configuration is downloaded from EE2.eu, every time you start the Launcher. It gives a possibility to improve things "live", tweaking values without the need to download full updates.
Preview video:
Custom Configuration Instruction
Every time you start the UP1.5 Launcher - default values get an update from EE2.eu. It means, that whenever I disover issues or improvement possibilities - the configuration file on Server will be updated, and you will have the newest possible default values for Eye Tracking, without installing additional updates.
This feature can also be manually customized by the UP1.5 Configuration file - UnofficialVersionConfig.txt. To open this file, in UP1.5 Launcher, click on the "Change UP1.5 Settings" button. Then click on the blue "UnofficialVersionConfig.txt" hyperlink, right under Mona Lisa picture. This will open the Notepad with administrator rights, so you won't have problems saving the file. After every change, you need to save the file and restart game. It's currently impossible to reload settings once game is started.
Values after the "=" sign are these, which are currently default in the newest version of UP1.5 (and the configuration file from the Server). If the variable is missing in the .txt file - it means that the launcher will read the default value. It's actually recommended to leave this feature running on default settings, so after updates you won't need to re-configure it, or you won't lose potential improvements. The following configuration variables are available:
Enable (1) or Disable (0) Eye Tracking. It's the main switch for this feature: TobiiEyeTrackerThreadAllowed=1
Enable (0) or Disable (1) Windows 10 Toast Notification with information that the Tobii Eye Tracker is available: TobiiEyeTrackerDisableWin10ToastNotification=0
A configuration string (the same that is downloaded from the Server). On this website you can see the newest, updated version. Please copy and paste all text (including [ ] characters). You will have to remove this line from your UnofficialVersionConfig.txt if you want to return to live updates at the Launcher start:
TobiiEyeTrackerCustomConfigurationString=
[EYETRACKCONF3]main,1,1,1,750,0.725,0,0,1,1|top1,1440,1000,65,75,0,0,0.31093|NoUI_top1,1440,250,40,80,0,0,|top2,1440,250,65,75,0,0,0.20703|top3,1440,500,30,0,0,65|bot1,1440,750,40,0,0,0,0.16953,0.35807|NoUI_bot1,1440,250,40,80,0,0,|bot2,1440,500,40,0,0,0|bot3,1440,500,40,0,0,0|left1,1440,250,40,80,0,0|right1,1440,250,40,80,0,0|topleft,1440,250,95,95,120,120|topright,1440,250,95,95,120,120|botleft,1440,250,90,90,120,7|botright,1440,250,90,90,120,7|NoUI_botleft,1440,250,90,90,120,120|NoUI_botright,1440,250,90,90,120,120[/EYETRACKCONF3]
Please refer to the image below, to understand how the configuration works. Positions like "top", "bot", "left", "right", "topleft", "topright", "botleft", "botright" are separated in the configuration string by the " | " character.
Section "main": 1 = The same as TobiiEyeTrackerThreadAllowed=1 described above. 2 = The same as TobiiEyeTrackerDisableWin10ToastNotification=0 described above. 3 = Enable (1) or Disable (0) inversion of the Right / Left arrows, when the CTRL key is currently pressed. Thanks to it, rotating the camera using the CTRL key is more intuitive and less confusing. 4 = Time (in miliseconds) which allows you to switch borders/corners, ignoring the extra "Sleep time" (listed below). It's useful, because without this "timeout", for example if you moved eyes from the right border to the top-right corner - camera moving would pause for 250ms (0.25sec). Too high values are also not recommended, to not unintentionally trigger the bottom scrolling when trying to look at the User Interface. 5 = A float value from 0.0 to 1.0 which is the percentage height of the EE2 screen, excluding the bottom User Interface. This has been calculated by me based on 3 different 16:9 screen resolutions, but tested and works fine on different aspect rations as well. The default (0.725) is 72.5%. The full screen resolution height is multiplied by this value. 6,7 = A custom screen resolution width, height used by the Tobii's AddOrUpdateDisplayArea function. The default value "0" uses screen resolution which is automatically detected by the UP1.5 Launcher. It's highly recommended to not change it. 8 = Enable (1) or Disable (0) checking if game is currently in the Menu / Multiplayer Lobby, to prevent simulating key presses until skirmish starts.
Example section "bot1": 1 = A float value which is a "Magic Number" that decides about the scale of the "Size Border" and "Size Extra" listed below. Setting this value to "0" disables the "magic" scaling. The default borders thickness was configured for the 2560x1440 screen resolution. With the higher/lower screen resolutions it could be too little/too much. The formula is as follows: X = ScreenResolutionHeight / MagicBordersScale. BorderSize = BorderSize * X. So, let's assume that the top border width is "25", and an user uses a screen resolution 2560x1440. X = 1440 / 1080. X = 1.333. BorderSize = 25 * 1.333. BorderSize = 33.33. It's recommended to disable this option (setting to "0") if you test your own variations, for only 1 screen resolution. 2 = Sleep time (in miliseconds), after which the camera will start moving, if the gaze point stays in this area for longer than this time. It's helpful to prevent accidental "shakes" which can be more annoying than helpful. It can be configured separately for each direction (Top, Bottom, Left, Right, Top-Left corner, Top-Right corner, Bottom-Left corner, Bottom-Right corner). For example, the Bottom values are higher, so when you move your eyes to the the User Interface area, it won't unintentionally move the camera down. 3 = A float value, which is a thickness (in pixels) of the border of the visible part of the screen. Lower values are closer the borders/corners, higher values might trigger camera scrolling too fast. 4 = A float value, which is an extra space (in pixels) that allows you to continue camera moving when looking beyond the monitor border. Without this option, the camera moving would stop too fast, especially when the "Border Size" value (listed above) was low. Please note that the extra space for the Bottom is 0. It's because increasing this value would trigger camera scrolling if you looked at the game widgets (top part of the mini map, time, calendar). 5, 6 = Position X, Y offset for the area drawing (might be used with different, hardcoded functions in Launcher). 7, 8 = Float (0 - 1.0) which is a percentage multiplier of the calculated UI distances (for the multi screen resolution support). It's used by an advanced calculation forumla in the Launcher.
Example section "topleft": 1 = "Magic Number" (as described above) 2 = Sleep time (as described above) 3, 4 = A thickness (as described above), but for corners it's additionally separated on Width/Height. 5, 6 = An "extra space" (as described above), but for corners it's additionally separated on Width/Height.
Every time you start the UP1.5 Launcher - default values get an update from EE2.eu. It means, that whenever I disover issues or improvement possibilities - the configuration file on Server will be updated, and you will have the newest possible default values for Eye Tracking, without installing additional updates.
This feature can also be manually customized by the UP1.5 Configuration file - UnofficialVersionConfig.txt. To open this file, in UP1.5 Launcher, click on the "Change UP1.5 Settings" button. Then click on the blue "UnofficialVersionConfig.txt" hyperlink, right under Mona Lisa picture. This will open the Notepad with administrator rights, so you won't have problems saving the file. After every change, you need to save the file and restart game. It's currently impossible to reload settings once game is started.
Values after the "=" sign are these, which are currently default in the newest version of UP1.5 (and the configuration file from the Server). If the variable is missing in the .txt file - it means that the launcher will read the default value. It's actually recommended to leave this feature running on default settings, so after updates you won't need to re-configure it, or you won't lose potential improvements. The following configuration variables are available:
Enable (1) or Disable (0) Eye Tracking. It's the main switch for this feature: TobiiEyeTrackerThreadAllowed=1
Enable (0) or Disable (1) Windows 10 Toast Notification with information that the Tobii Eye Tracker is available: TobiiEyeTrackerDisableWin10ToastNotification=0
Sleep time (in miliseconds), after which the camera will start moving, if the gaze point stays in this area for longer than this time. It's helpful to prevent accidental "shakes" which can be more annoying than helpful. It can be configured separately for each direction (Top, Bottom, Left, Right, Top-Left corner, Top-Right corner, Bottom-Left corner, Bottom-Right corner). For example, the Bottom values are higher, so when you move your eyes to the the User Interface area, it won't unintentionally move the camera down: TobiiActivationSleepMsTop=250 TobiiActivationSleepMsBottom=500 TobiiActivationSleepMsLeft=250 TobiiActivationSleepMsRight=250 TobiiActivationSleepMsTopLeft=250 TobiiActivationSleepMsTopRight=250 TobiiActivationSleepMsBottomLeft=500 TobiiActivationSleepMsBottomRight=500
Time (in miliseconds) which allows you to switch borders/corners, ignoring the extra "Sleep time" (listed above). It's useful, because without this "timeout", for example if you moved eyes from the right border to the top-right corner - camera moving would pause for 250ms (0.25sec). Too high values are also not recommended, to not unintentionally trigger the bottom scrolling when trying to look at the User Interface:
TobiiIgnoreActivationSleepWhenMovingForMs=500
Enable (1) or Disable (0) inversion of the Right / Left arrows, when the CTRL key is currently pressed. Thanks to it, rotating the camera using the CTRL key is more intuitive and less confusing:
TobiInvertDirectionsWhenCtrlIsPressed=1
A float value from 0.0 to 1.0 which is the percentage height of the EE2 screen, excluding the bottom User Interface. This has been calculated by me based on 3 different 16:9 screen resolutions, but might need tweaks for different aspect ratios. The default (0.725) is 72.5%. The full screen resolution height is multiplied by this value: TobiiEE2NoUIScreenHeightPercentageFloat=0.725
A float value which is a "Magic Number" that decides about the scale of the "Size Border" and "Size Extra" listed below. Setting this value to "0" disables the "magic" scaling. The default borders thickness was configured for the Full HD screen resolution. With the higher screen resolutions it could be too little. The formula is as follows: X = ScreenResolutionHeight / MagicBordersScale. BorderSize = BorderSize * X. So, let's assume that the top border width is "25", and an user uses a screen resolution 2560x1440. X = 1440 / 1080. X = 1.333. BorderSize = 25 * 1.333. BorderSize = 33.33. It's recommended to disable this option (setting to "0") if you test your own variations, for only 1 screen resolution: TobiiMagicBordersScaleTop=1080 TobiiMagicBordersScaleBottom=1080 TobiiMagicBordersScaleLeft=1080 TobiiMagicBordersScaleRight=1080
A float value, which is a thickness (in pixels) of the border of the visible part of the screen. Lower values are closer the borders/corners, higher values might trigger camera scrolling too fast: TobiiSizeTopBorder=25 TobiiSizeBottomBorder=15 TobiiSizeLeftBorder=25 TobiiSizeRightBorder=25
A float value, which is an extra space (in pixels) that allows you to continue camera moving when looking beyond the monitor border. Without this option, the camera moving would stop too fast, especially when the "Border Size" value (listed above) was low. Please note that the extra space for the Bottom is 0. It's because increasing this value would trigger camera scrolling if you looked at the game widgets (top part of the mini map, time, calendar): TobiiSizeExtraOnTop=50 TobiiSizeExtraOnBottom=0 TobiiSizeExtraOnLeft=50 TobiiSizeExtraOnRight=50
A custom screen resolution width/height used by the Tobii's AddOrUpdateDisplayArea function. The default value "0" uses screen resolution which is automatically detected by the UP1.5 Launcher. It's highly recommended to not change it: TobiiCustomScreenResWidth=0 TobiiCustomScreenResHeight=0
Best regards, Dr.MonaLisa,
Unofficial Patch 1.5 Developer.
We use cookies and we monitor your activity to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies from this website. If you would like to change your preferences you may do so by following the instructions here