As a part of my previous research project I investigated methods of integrating bio-metrics into games in the form of heart rate monitoring as well as possible uses of this data. As this project involved completing a proof of concept for integrating this data recording into an unreal project it was a relatively straightforward process to integrate this technology into our game. The original solution was modified and simplified somewhat in order to address some performance problems but otherwise went smoothly.
The player is required to wear an ANT+ enabled heart rate monitor, such as a wrist strap, as well as plug in a USB dongle to the computer they are running the game on. After this it is simple, as running the HR recording program alongside the game will provide live data from the player about their heart rate that the game can display. In our case we allowed the player to display their HR live as they are riding down the track in the game.
From the inside of the game, a blueprint is run frequently in order to poll the live data from the player. This data is then shared with the UI and can be pushed to the screen instantly in the form of a widget in the display. Because of the dependencies on hardware it needs to implement an optional system for the game.
This includes logic to allow the player to toggle the display on and off while playing the game, which is also important for performance reasons. The polling happens multiple times a second so if this were to run when it wasn't needed we would be wasting valuable resources.
The functionality for getting this to work was developed in a modular form which involves a separate executable to be run while playing the game. This works fine in the current development state but this would need to be address before a release of the game. This could either be packaged with a startup script of the game to run automatically or a native solution could be integrated into the unreal project. The latter is fairly doable as both programs use C++, but would be more of a challenge to integrate into other engines such as Unity as you would need to deal with C# instead.
Possibilities moving forward
Moving forward we have a lot of possibilities in terms of applications of this heart rate data. Recording of the data and sharing with a home server is an obvious solution which could be done with the proper resources. This would produce an opportunity to compare the heart rate data of all of the players interacting with the game which provides lots of possibilities for data analysis into the cause of player HR fluctuations.
While this is an interesting avenue there have been some issues raised with the ability to infer any real meaning from a one dimensional bio-metric such as heart rate on the player alone. This will probably cause any further development in this area to be de-prioritized, and will have to be evaluated against the value of other features. More information on this issue can be read in my relevant research portfolio.