ExerAdventure: A Mobile 2D Platformer Game to Encourage Fitness

In this paper, we design a mobile 2D platformer game named ‘ExerAdventure’ where progress inside the game world is dependent on physical activity in the real world. The game has two modes, namely adventure and story mode. This design can motivate people to lead an active and healthy lifestyle.


I. INTRODUCTION
Gamification is defined as applying game design and game mechanics philosophy to something that is not a game to increase user engagement, happiness, loyalty, and more [1] [2].Most of the studies conducted on the effects of gamification show positive results on individuals [3].The term 'Gamification' was first used in 2008 in the context of computer software.Gamification gained popularity in 2010 when people started using the social/reward aspects of gaming into the software.Gamification is intended to work on people's natural desires for competition, achievement, status, self-expression, socializing to increase productivity, and other desired results.The most important of gamification strategies are a reward system for players who complete tasks and the feeling of competition to engage more players and push players to get higher scores.
Game design elements are the base of gamification.Some of the typical game design elements are points, badges, leaderboards, performance graphs, meaningful stories, avatars, and teammates [4].
• Points are basic elements in most of the games.It is a number or a bar which increases with the successful completion of various tasks or levels inside a game.
• Badges are a visual representation of various achievements a player has accomplished.Badges are earned by getting a certain number of points, and they stay with the player in their in-game gallery even when the game is over, unlike points that reset every time the game is over.• Leaderboards are used to leverage on player's sense of competitiveness.Leaderboard rank players according to their relative accomplishments.• Performance graphs are similar to leaderboards, but they compare a player's performance with himself rather than other players who are also playing the same game.• Meaningful stories are added to the game to elevate the game experience from basic points/performance system.Meaningful stories are there to provide a message through the game.Non-player characters inside the game are used to communicate the message and keep the player on the right pathway.• Avatars are a visual representation of the player.Some games allow players to build avatars from scratch, whereas some games allow players to change the clothing of the avatar by completing levels and unlocking new wearables.• Teammates whether other players playing the same game or non-player characters are added to improve player's team coordination, reduce conflict, and work towards a common goal.
Gamification has been widely applied to various sectors like Marketing [5], Inspiring participants to generate more and better ideas [6].Gamification is commonly used in healthcare to encourage patients to lead a productive and healthy lifestyle [7].Gamification is also being used to revolutionize education and work environments [8] [9].In healthcare, gamification can be used to motivate people to lead a healthy lifestyle by using avatars and leaderboards.One other application of gamification in healthcare is to help people battle autism and depression by use of achievements and storytelling ideology of game design.
Gamification applications in healthcare include various domains such as self-management and medication application, healthcare applications for kids, fitness and nutrition applications, physical therapy and rehabilitation applications, and emotional health applications.According to the analysis of health and fitness applications on the App store, conducted in winter 2014, shows the extensive use of gamification techniques in health and fitness apps [10].These techniques include badges, levels, scoreboards, competition with other users, awards, and achievements [11].The ability to share scores with friends and the positive feedback the user receives motivates the user to keep playing the game, which in turn helps them to stay fit [12].There is a shred of clear empirical evidence that shows positive health-related behavioral change through the effect of gamification [13].Games can be used not only to motivate gamers to stay fit and active but also to generate awareness of a healthy lifestyle.Fitness games work on the Premack principle by coupling fitness with games and thus making staying fit, a fun activity [14].

II. RELATED WORK
In the last few years, mobile gaming has seen a new trend, as games use sensors built in the phone to interface between the user and the device.These games intend to encourage users to get out of there comfortable lives and perform some kind of physical activity.The combination of the surrounding environment with the game story attempts to improve the wellbeing of the user.Various games for health have been made so far, including Dance Dance Revolution, The Asthma Files, Zombies, Run! and SuperBetter, to name a few [15].All of these games belong to different styles.Dance Dance Revolution (DDR) combines music, rhythm, and physical exercise.DDR setup consists of a screen, speakers, and a floor pad with directional arrows.The objective of the game is to dance and follow the instructions shown on the screen by stepping on the required directional arrow.The study conducted by Johanna H. showcased that the majority of the users liked the game and used to play the game frequently [16].The Asthma Files is a computer program developed to educate users about Asthma.It includes various interactions, quizzes, and games that focus on Asthma based information [17]."Zombies, Run!" is a smartphone-based application that combines running with the videogame.The objective of the game is to run in a postapocalyptic world filled with zombies to gather supplies.User is required to plug in headphones and go for a run outside in the real world.GPS is used to track how much the user ran, and the same will be applied to the game avatar [18].SuperBetter is a superhero-themed psychological game.The objective of the game is to make friends and allies who help the player deal with their problem.The Player is required to make a goal list and try to complete it with the use of powerups or activities that the user can do despite their condition.A Randomized, controlled study was conducted, and it was found that playing SuperBetter significantly improves mental health and reduces symptoms of depression [19].Pokémon Go is another example.In this game, the user interacts with all the game objects like Pokémon, Poke stops, Gyms, and special events by walking to different locations in real life [20].
Slot machines are the most popular form of casino gambling.To make slot machines more attractive to the player, various game design principles are used, and these techniques can also be applied in casual games and fitness games to increase user engagement.The first of these principles is 'Rewards.'There are various forms of rewards that can be incorporated in the game, like auditory and visual rewards.Auditory and visual rewards include the use of animations and sounds to give the user a feeling of achievement.Other forms of rewards include a point system and leveling up.The next important aspect is 'Reinforcement Schedule'.To give more meaning to rewards, a schedule is used by Slot machines, which decide when and how big of a reward should be awarded to the player.Following the reinforcement schedule shows the player that to progress further in the game, a certain level of skill is required, and rewards would not just be awarded depending on the time elapsed.Non-rewards such as near misses and losses disguised as wins are used in slot machines to make the user not feel bad about losing and pushing them to play again.These principles can also be used in game design.Nearly missing the goal pushes a player to go back and do better, and consolations for losing make the player feel not too bad and thus not letting them give the game up.There is strong evidence suggesting players prefer control over randomness.In the game Tetris, the player has control over where and which orientation they want to place the block, but which block is going to come next is random.Thus, players think that they have control over the game, but the randomness of the blocks makes this control an illusion.Bonus Rounds and Competition are game design principles that add flair to the game by including something extra that is not part of the actual gameplay but keeps the players on their toes.Bonus rounds can be added to the game randomly or in a sequence.Bonus rounds are added to the game as an idea that even if the player has mastered the game, there is still something to play for.Competition can be added to the game by either letting players play against other players or keep track of their progress as compared to other players with the help of leaderboards [21].
'World of Workout: A Contextual Mobile RPG to Encourage Long Term Fitness' is a mobile role-playing game (RPG) where player's game avatar levels up by activities performed in the real world.This game uses GPS and accelerometer to track user movements and apply the rewards in the game.AndEngine is used to develop the game and data is stored in an online database.A web page is made for users to track their exercises [22].Another popular game 'Pokémon Go' uses GPS to track players in the real world.The user walks in the real world and uses Augmented Reality (AR) to catch creatures in the game known as Pokémon.Pokémon Go also has an Adventure Sync mode, which uses step tracking even when the user is not playing the game to reward the user based on how much they have walked [23].

III. PROBLEM DEFINITION
Since 1985, obesity in Canada has increased by two-fold.In 2017, Public Health of Canada reported that 64% of adults and 30% of children above five years old are overweight or obese [24].We are spending a lot of time in front of screens, whether computer or smartphone and it is one of the leading reasons for this obesity rate.To counter this problem, various healthcare games have been developed to motivate users to lead a healthy lifestyle.The empirical approach used in this research also encourages people to utilize leisure time for substantial entertainment along with a much-needed physical activity in day to day life.In this paper, we developed an android, platform-based mobile game named 'ExerAdventure' to motivate physical activity in the real world.The game has been developed using the Unity game engine and Google Play services.Google Play services have been used for authentication in conjunction with Firebase.Leaderboards and Achievements have also been added to motivate the player to play the game and thus making the player perform physical activities in real life.

IV. METHODOLOGY
'ExerAdventure' is a 2D platformer game made with Unity game engine using C# scripts.The main objective of the game is to motivate its players to perform a certain kind of physical activity i.e., Walking, in the real world, to keep them physically fit.To verify if the players are keeping up with their physical activities, Pedometer API is incorporated in the game to get the step count of the user.The user is allowed to play the game only if they have met a threshold of physical activities required to play a certain level.When the player opens the game, they are authenticated using Google Play games and Firebase.The game has two modes, namely Adventure mode and story mode.Adventure Mode is an endless 2D platformer mode in which player is asked to eradicate zombies in an apocalyptic zombie world.The user can revive its game character using revives.Revives can be collected by walking in real life.The Story mode has multiple levels, and by the end of each level, the player learns the secrets to put an end to the Zombie apocalypse.Achievements and Leaderboards are incorporated in the game to increase user engagement, which will make the user play the game more and thus help them towards their desired physical fitness.Firebase Analytics is used to analyze user activity and to better understand the effect of games on a particular demographic.The design flow of the game is shown in Fig. 1.

V. PROTOTYPING
For the prototyping purpose of Gamification in healthcare, we developed an android game 'ExerAdventure' and published the same on Google Play store.The game application uses most of the Google Play games services like authentication, leaderboards, and achievements.The authentication key from Google Play games sign-in is also sent to Firebase, and data collected from the game is used for analytics purposes.User demographics data is used to visualize where all the users are situated and how often the game was opened in a given time frame.The game has two modes to choose from, namely Adventure mode and Story mode.Both of these modes have separate leaderboards.There is one more leaderboard for the step counter.This leaderboard shows the highest number of steps walked by a user while holding the android device.
Step tracking is done solely using the Pedometer built inside the device.There are a total of 10 achievements in the game which can be unlocked by walking 500, 1000, and 1500 steps and by completing the story mode levels.

A. Gameplay
The adventure mode of the game is an endless platformer 2D mode.There are three different sprites for the platforms, and these platforms can be of any size and can be horizontally or vertically moving.C# code for RandomPlatformGenerator script is given in subsection A of the Appendix.After 15 seconds, the enemy zombies start spawning in 5 seconds interval.There are male and female zombies, and they can be stationary or moving in nature.After 30 seconds enemy bullet starts spawning in 10 seconds interval as they move right to the left vertically.The player dies failing to jump on a platform, and then the gameover menu is shown.On this menu, the player can choose to revive itself by using one of the revives.Revives are gathered by walking in real life where 1 revive costs 100 steps registered using the pedometer.The revive system is added to the game to encourage physical activity in the real world.Fig. 2 shows the different game modes and levels along with the game story divided into various modes.
The story mode of the game has three levels, namely Grass level, Sand level, and Rock level.All of these levels are locked in the beginning.Grass level is unlocked by walking 500 steps in the real world.Doing so opens a Google Play achievement, which in turn unlocks the Grass level.The Grass level of the game is the easiest level with no moving zombies.Completing this level unlocks an achievement, and the player learns the first tip on how to end the zombie apocalypse.To unlock the sand level, the user has to complete the grass level and unlock another achievement, namely 'walk 1000 steps.'The sand level incorporates moving zombies to make the game a bit harder.Once the user completes the Sand level, Rock level can be unlocked by completing the 'walk 1500 steps' achievement.The final level of the game, namely Rock level, is the hardest level, which adds another hurdle in the game in the form of right to left moving Enemy bullet.After completing this level, the player put an end to the Zombie apocalypse and completes the story mode of the game.C# code for LevelUnlocker script is given in subsection B of the Appendix.
The game controls are as simple as they can be.There are four buttons on the screen that can be accessed by tapping on the touch screen.On the left side of the screen, there are move horizontally left and move horizontally right button.These buttons are marked by the left and right arrows.On the right side of the screen, there is another set of controls.The jump button can be pressed to move vertically.This button is used to dodge enemies and jump to different platforms.The last control button is the Fire button, which is marked by 'X.'This button can be used to fire flames in the direction the player is facing and kill the zombies.Fig. 3 showcases the game controls in Rock level of the Story mode.

B. Analytics
As mentioned before, when a user logs in the game using the Google Play games authentication system, the authentication key is also sent to firebase, which is used to perform basic analytics.By default, firebase keeps track of Active users, Daily user engagement, Crash-free users, App version adoption, User retention, Audience information like user location and devices they are using, and which operating system platform is used by the users.Firebase also shows the revenue generation charts.However, we have kept our application free of charge, and thus these analytics does not apply to this project.
Out of all the analytics performed using firebase, two of the most important are Active users and our Audience information.Fig. 4 displays the graph of active users since the first deployment of the application from the testing phase i.e., Feb 4th, 2020, till Mar 31st, 2020 i.e., three weeks after the game was published on Google Play Store.The graph shows three different timelines, 28-Days, 7-Days and 1-Day.From the graph, we can deduce that active users have increased in all three timelines since the first deployment of the application which shows that application is well received and users do not mind walking a small number of steps if the incentive is good, which in our case is the entertainment from playing the game.The second most crucial analytics is Audience information.Fig. 5 displays the application distribution in the different parts of the world.From the figure, we can see that we have the most users in Canada, followed by India and the United States of America.We never commercially promoted this application, and we only asked some of our acquaintances in India and Canada to try out the application.However, the number of sessions is more than we imagined, and the application was downloaded in the United States when we never promoted the application there.This shows that given a significant promotion, Exercise and fitness games can be very famous if the gameplay is fun and interesting.

VI. EVALUATION
We conducted a user study on ten graduate students at Lakehead University.Most of these students play mobile games and are familiar with games like Pokémon GO!We asked these students to play the game for a few days and rate the game out of five based on the accuracy of movement tracking, game controls, the game story, the likelihood of future gameplay, motivation to walk, and ratings compared to similar apps.On March 31st, 2020 the google play rating of our application was 4.9/5.Table I shows the results of the user study.

VII. FUTURE WORK
As a consequence of our user study, we have identified that game story is the most important component of any game, and we need to work on our game story and make it more appealing to the users.We currently use walking to generate revives in adventure mode and to unlock the three levels of the story mode.This approach is good for short term motivation but not for long term motivation.So, in the future, we would like to incorporate avatar development in our game, and the only way to develop the avatar will be through walking in the real world.Currently, we only use Pedometer built inside the smartphones for step tracking, but Using Google Fit will allow us to track more kinds of activities than just walking.Using Google Fit will also make our activity tracking better, and Google Fit works with most of the fitness bands, which will make our application more streamline.One more thing that can be done to incorporate long term motivation in our game is by making the game multiplayer as we know competition among users is a great source of motivation.

VIII. CONCLUSION
This research project aims to improve upon the existing health and fitness games by making an addictive gameplay and game story where progress in the game story depends upon the physical activities performed in the real world.In our project we added motivation for walking in two forms, one being getting revives before playing adventure mode and other being walking to unlock different levels of the story mode.
Gaming is an ever-growing and very competitive market.In the world of all the consoles and PC gaming, Smartphone gaming has an edge because of its portability, price and the presence of various useful sensors built inside a small device which makes smartphones perfect for fitness gaming.
Results of firebase analytics and user study show that a direct connection between exercise and in-game progress creates an effective encouragement for fitness gaming.From the results of user study, we saw the need for improving our game story and long-term incentive to walk.But this feedback also gives us the confidence that given a good and addictive study, fitness games can revolutionize the health and fitness application market.