Type: context-aware treasure hunt exergame with augmented reality
Purpose: encourage children to do physical exercise through augmented reality treasure hunt in real world
Place: anywhere (Ajou University)
Technologies: Client: Android, GPS, Vuforia AR SDK; server: J2EE servlet, MySQL; wearable sensors such as smartwatch and heart rate monitor.
Contributors: Teemu H. Laine, Joonas Westlin, Hae Jung Suk, Jeong Hwa Kang, Sung Lae Kim and Jun Mo Jung.
Calory Battle AR is an Android-based augmented reality exergame which aims at promoting physical activity among children but it can also be enjoyed by adults. It is different from console-based exergames (e.g. some of Nintendo Wii games) in that it is played in real world contexts, thus including an additional motivation through context exploration. The game can be easily deployed at different locations because it does not require any special equipment other than an Android smartphone and printed image targets on augmented reality content is drawn. Context-awareness is currently implemented using a mobile device’s GPS sensor but using other on-board sensors, such as accelerometer for movement detection, is under development.
The Calory Battle AR story features the Dews, the good guys, and the Caloroids, the bad guys. The Dews extract energy from our sweat and with that energy they cast spells on us that make our bodies healthier and minds sharper. The Caloroids hate sweat and thus want to stop us from sweating and to become unhealthy. The player’s role is to help the Dews by finding and defusing calory bombs that have been placed around a geographical area by the Caloroids. The basic game flow is presented in the following figure.
There is a global time limit for finding the bombs so the player must run from one bomb to another. After finding a bomb, the bomb’s local countdown timer is started at a random time from 10-60 seconds during which the player must defuse the bomb. A bomb is defused by carefully removing virtual fuses in correct order using a multitool. The fuses have appearance of unhealthy food such as pizza and hamburger. The player earns points by defusing the bombs and for remaining time at the end of the game (i.e. when all bombs have been defused or exploded). After finishing the game, the player can upload score to a hall of fame website where they can be compared against other players’ scores. Figure below illustrates bomb defusing activity followed by game play videos.
Technical architecture of Calory Battle AR (see figure below) is divided into rendering engine code written in C++ and Android Java code that runs on the Dalvik virtual machine. Communication between these two parts is done over Java Native Interface (JNI) which allows Java code to call native functions. We used Google Maps API to implement the map functionality. The augmented reality feature is implemented using Qualcomm’s Vuforia SDK which supports both Android and iOS platforms. AR content rendering engine was written in C++ so that it communicates with Java code by events. For example, when new image target is detected or a collision happens appropriate events are triggered. An event manager in Java code delegates received events to all registered listener components which then perform necessary actions. This technique allows changing the user interface, game logic and content in Java code without changing the underlying rendering engine.
The purpose of the activity detection middleware component is to enable flexible utilization of various sensors and other sources of contextual data to infer the user’s activity (e.g. running, walking, jumping) in real time. Detected activities can be used for defining new task types in the game. The sensor data collection and preprocessing module aggregates, filters and organizes data from wearable devices (e.g. heart rate monitor, smart watch) and onboard sensors. After this preprocessing, the data analysis module applies activity detection algorithms to the data in order to notify the game platform through a listener interface what the user is currently doing. By combining multiple sources of data we can improve the accuracy of activity detection algorithms. For example, using accelerometers on both smart watch worn on wrist and phone inserted in pocket, we can more reliably tell whether the user is running or rowing.
In spring 2013 a version of Calory Battle AR was created using Unity 3D game engine. The aim was to test how a third-party game engine could be used in developing the game. The game concept was the same but it was played indoors and bomb defusing was implemented with virtual buttons instead of a multitool. The following video presents gameplay of the Unity version.