Heart rate horror VR game, my final year project.

Edited on 16 August 2020. Originally posted on 13 February 2018.

The content in this page is an extraction from my final year project thesis. Copyright is owned by University Telekom Sdn. Bhd. of Malaysia.


Heart Rate Horror VR Game is the title of my final year project thesis. It revolves around biofeedback, an idea where one can become more aware about one's physiological functionalities and to be able to control them. In other word, we can learn to better control ourselves when we are given evidences derived from related responses caused intentionally or subconciously.

This idea is experimental and emerging in nature. There is no definitive representative for biofeedback from the gaming industry. Hence, this presents the academia a blank canvas to use existing game genres and hardwares to make abundance of attempts to create new and innovative biofeedback game and gaming peripherals.

Before Development

After discussion with my thesis mentor, Albery Quek, we decide to use heart rate as the physiological signal for this project. I will have to come up with a game and a gaming device as the proof of concept for this thesis.

The game falls within the horror genre. To make the project affordable to develop, we will use a mobile phone as a VR display, some DIY electronic kits to make the game controller and a market ready game engine.

Since there wasn't any consumer-grade game controller with the ability to measure heart rate, I figure out I have to build one.

The Journey

The project involves discovery and experiment with things I have not previously dabbled with, which is electronic and hardware. After some reading and research, I make a purchase for the parts that can be assembled as a prototype device. With a piece of breadboard, the components are easily wired together in a cardbox. The controls are exposed from the cut-out top part of the cardbox and the heart rate sensor on the left side.

However, there is another difficulty. There is no ready to use library for the game to connect to the prototype controller via Bluetooth. I have to learn just enough Android programming and Java to develop a rudimentary Android Archive that serve the purpose through much trials and errors.

It spans two semesters or approximately eight months of the final year of my bachelor's studies. I have to take care of this project along with commitments to other subjects and their associated assignments, projects, term tests and exams.

One of the most memorable thing is that, along with other game students, we are expected to deliver at least three games for other specialisation subjects per semester. We clock a lot of crunching hours back then.

The Results Tldr

The deliverables of this project consist of a custom-built game controller, a mobile horror VR game and a thesis.

The custom-built game controller is built on top of an Arduino microcontroller, a Bluetooth module, a movement control pad and a heart rate sensor. The prototype is crudely wired into a small cardbox. A pair of AA batteries power the device.

I develop the game with the Unity3d engine. Most of the game assets are from the community asset store and some of them are modelled and animated by myself. The game delivers virtual reality experience via a pair of Google Cardboard and an Android mobile phone as the VR display.

The game communicates with the game controller through Bluetooth.

Core Idea

Within a horror-themed environment, the player has to be calm all the time despite also being accompanied by some zombies.


The core gameloop involves a sets of if-else conditions, basically a heart rate check, that will average the heart rate of the player in a duration of time to determine if the obstacle can be cleared.

The player has an exhaustable gauge stamina used for walking. When the player runs out of stamina, the game ends.

Within each level, there will be checkpoints. The level can only be completed by walking into the exit at the end. To traverse the map, the player has to walk through the level. The player is only given enough stamina to walk to one checkpoint at a time. The only way to replenish their stamina is by clearing the heart rate check at each checkpoint. Each checkpoint has at least one zombie.

The heart rate of the player is measured at a checkpoint. The player is given a few chances to assume a calm behaviour. If the heart rate of the player exceeds the acceptable rate, one chance is taken away. After losing all chances, the player will be killed by the approaching zombie. The player then respawns at the previous cleared checkpoint.

If the player is calm during the measurement, the player can move on unhintered. Stamina gauge will replenish to full as well. Reaching the exit at the end of the level allows the player to progress to the next one.


The game consists of three levels. The zombies have different roles in the three levels.

The first level serves as the tutorial stage. There will be several checkpoints in a corridor. The player get pass each of them to understand the core gameplay. Zombies in this map are largely inept unless the player fails the core gameloop.

The second level features a large and running zombie. A large-sized enermy is often able to instill fear. This was taken inspiration from how a school of fishes pretends to be a bigger fish by orchastrating their swimming formation to scare off a predator. By having the zombie running towards the player, it is to induce anxiety in the player. This is to give a message to the player, hurry up, understand how the level works and defend yourself, because if you don't, you lose the level. The same core gameloop applies, stay calm to clear the level. It also involves a few checkpoints. Each checkpoint controls a barrier, the heart rate check here determines if the barrier will still function to block the zombie from eating the player.

The third level takes inspiration from tower defense. There is an incarcerated large zombie. During a breach, the zombie attempts to escape. The barrier will completely fail if all the defense facilities are destroyed. There are a few big guns installed in the map, the player will have to activate all of them, with the core gameloop and heart rate check, to attempt to kill the zombie. Each gun will need to cool down after shooting once. This level design also brings the message of staying calm to fix the scenario despite having quickly failing essentials.

Player Testing

Along with other FYP students working on game-related projects, we run a session of player testing with some volunteers. A few testers report enjoying the novelty biofeedback input of heart rate in a horror-themed game. While some testers do not find the project impressive as they wanted more stimulations from the game.

Demo Video


To put out a summary, I develop a game and a custom game controller to involve heart rate in the gameloop. It is to reflect how much anxiety the player is feeling and to make the player aware that it is controllable.

This project provides a lot of learning opportunities and also experiences in a game development project flow. However, the outcome of the project happens not to be a game but rather it is an attempt at creating a novelty experience.

I am glad that this project turns out fine in the end. That was when my bachelor's studies completed.