A Framework of Developing Mobile Gamification to Improve User Engagement of Physical Activity : A Case Study of Location - Based Augmented Reality Mobile Game for Promoting Physical Health

—This study presents the framework of developing mobile gamifi-cation for conducting application on health promotion. The method is composed of four phases adapted from the spiral model: objectives determination for enhancement of positive health; core game flow and mechanics definition; development, test and evaluation; and the next iteration plan. To evaluate the framework, we developed Camt comic run application to provide a practical method to select the suitable game elements (leaderboard, score point, map progress bar, inventory and randomness) and validation by Game Experience Questionnaire (GEQ): Four weeks with 40 participants were to investigate the outcome of the application which was divided into two stages. Week 1 and Week 2 were the baseline stage collecting behavioral information of participants. In the second stage – Week 3 and Week 4 – the participants were divided into two groups: the ones who use our application and those who don’t. The results showed that gamification drove the engagement and motivation of participants who had not reached the standard guideline. The data showed significance mostly in participants who had less physical activity than physical activity guidelines at least 150 min/week and average increase physical activity rate from baseline (119.20%).


Introduction
Most people do not recognize the public health guidelines and benefit of recommended levels of physical activity. Daily physical activity can maintain a good healthy weight and help to reduce the risk for high blood pressure, lipid disorders, high obesity, diabetes and cardiovascular diseases. Nevertheless, many physically inactive people can usually be found in high-income countries and amongst children, women and older individuals [1], [2]. In addition, a recent study for worldwide trends in insufficient physical activity from 2001 to 2016 including data from 1.9 million participants across 168 countries summarized that 27.5% of adults were not sufficiently physically active [3].
research proposes a method of designing and implementing the application of the concept of gamification for health promotion to engage users in physical activity which focuses on running and jogging.
Thus, this study makes several contributions to the literature and additional research to gamification. First, we proposed the framework to design gamification in context of healthcare application which can be guideline for developers and game designers on selecting game elements to be implemented to the system for mobile gamification. Second, we demonstrated the effectiveness of location-based augmented reality mobile game to drive the engagement and motivation of runners. This research was structured as follows: some background information on the related work was presented in section 2. Section 3 presented the design system architecture including the step-by-step case study of game element selection. Section 4 showed the result of the feasibility study evaluation. Discussion in section 5. Finally, section 6 contained the conclusion and future work of this work.

2
Related Work

Serious games and gamifications
In the last 10 years, gaming has evolved to be used more than just for entertainment in many different disciplines. Both "serious game" and "gamification" have been proposed to serious objectives, such as to motivate and educate a person and to change one's behavior; it can make a contribution to healthcare, education, and other settings [37], [38]. In addition, the definition of Serious games and gamification can be defined variously depending on the researcher. Even so, both of serious game and gamification employs the concept elements in entertainment game to motivate the users to change pattern or finish the game's objectives. Serious game refers to game platform used for education, simulation, job training or any specific purpose except only for entertainment [39]. In contrast, gamification refers to the application of game-design elements and game principles in non-game contexts [40], [41]. Thus, a gamified mobile application may not operate as full game platform, only its design is used: point, badge, leaderboard, and experience to engaging the application.

Mobile gamification and augmented reality application for physical activity
Gamified mobile application used game elements, such as avatar, point, and badge to drive both intrinsic and extrinsic motivation [42]. Previous study has found that gamification yielded positive outcome on physical and health-related behavior and outcome [43], [44]. "Stand Up, heroes!" a gamified mobile application developed by [45]. The objective of the application is to motivate users to stand on public transportation in japan and the users will earn points to exchange for new avatars in the application. It was a very successful system in the early user study. [46] Proposed application "Puzzle walk", the gamified mobile, promotes physical activity of adults with autism spectrum disorder. The system applies game elements such as animated characters, problem-solving, and engaging storylines to drive intrinsic motivation of adults with ASD and encourage them to engage in physical activity by walking, following the scenario based. The gamified mobile for physical activity, "Plunder Plent" [47], [48], is for children and adolescents. This system was designed based on motion based controllers to interact with body movement which user can be immersed in sailing on ship. Our work, "Camt comic run", also used the same concept and encourage the players to engage in running, jogging. It can be used for promoting event of running as well.

Methodological backgrounds and frameworks for designing gamification
Gamification is represented in term of general modelled. MDA [55], [56], [57] is a formal approach for representing game design by linking between Mechanics, Dynamics, and Aesthetics components. [58] proposed UAREI modelling framework for visual representation of software gamification. The advantages of this model were supporting feedback model transformation to executable code. Machinations diagrams [59], [60] implemented the design pattern for gamification.
In terms of frameworks for designing gamification, most of the framework were used for education. For example, Klock et al. (2016) presented a 5W2H Framework guideline for gamification of design, development, and evaluation. The framework helped the design to align the goal with first 5W consisting of "Where", "Who", "What", "Why", "When" and 2H of "How", "How much". The seven main aspects were presented in terms of the design of an educational system. [11] designed the guide for teachers which allowed them to define curriculum objectives and Intended Learning Outcome (ILOs). This framework was called Learner-Centered Framework.
The study of [12] proposed the framework with seven stages of design for m-health application: finding the system requirements and list of features; mapping the player characteristics; identifying the flow process; defining similar systems; selecting the game elements suitable for the system; developing the system; and evaluating. They validated the framework with the hypertension monitoring application.

Designing System Architecture
This research proposes the implementation of a software development of system architecture from the Boehm spiral model [19]. We adopted the methods proposed by [20] and [12] with traditional Software Development Life Cycle models based on the spiral model, including the iterative step of process of fun and engagement on gamification model of [12]. We defined four phases of our model software development process in Fig.1.

3.1
Determining objectives for the enhancement of positive health Requirement: Gathering the requirement and the objectives in order to provide the list of functionalities, elaborated and analyzed at the start of every phase. The first step is to clarify the objective of the requirement with the Ishikawa diagram [25] in order to propose the gamification of the system to match the player's characteristics. In this case study, we evaluate our framework of our case study application (Camt comic run App) which promotes people to do engagement running exercise frequently. We still proposed the factor which we have to monitor, and what the suitable system would have to provide for engagement with the people to keep doing exercise. Knowledge co-creation for mapping expert: However, in order to effectively design the software, we employed the concept of Knowledge expert co-creation-based framework [21] which involved knowledge experts who were currently supported by gamification application applied to field-based environment. The basic outline of the framework is to ensure that the health promotion professionals, runners, game designers and software engineers work together to understand and deal with the target audience's limitations to motivate the player to engage the application and get the other benefit from the exercise. To follow the framework, it is necessary to understand the perspective for each knowledge expert who use the application, with characteristics such as behavior, age, motivation, fun factor, knowledge domain, among others. Several factors from knowledge experts are used for the software requirement which can directly influence which game elements should be put in the game design. For the Camt comic run app, the first target of players is people who want to do exercises but lack motivation to do so, other target is to enable health promotion to change the behavior of player in order to increase control over their own health such as Pokémon go. The example of our case is shown in Table 1.

Health promotion professionals
Expert as advocates for healthcare primarily concerned with both promoting and protecting the interests of service users.

Doctor
Player Group of players who use the system Expert of designing engagement systems to change behavior.

Runner Designer Game designer
Software engineer Expert to apply the principles of software engineering to the design, development, maintenance, testing, and evaluation of application software.
System programming

Defining the core game flow and mechanics
Defining core game flow and mechanics: This process consists of software requirements from previous process related to core game mechanic mapping to user's interactive. In terms of defining core game mechanics, the possibility of the concept idea from the knowledge expert are listed to mapping to user behavior. Once the software requirement is clear we then did the brainstorming to sketch the concept of the game flow diagram. The concept of game flow diagrams of Camt comic run are separated into five processes. We represent the game mechanics for the player journey of MDA framework [55] as shown in Figure 3. The key part of our core idea is to build engagement during the running across the faculty and natural environment around the Chiang Mai University and combining game mechanics to discover the new monster around the route of running which have been a proof of successful concepts from Pokémon go core game mechanics to promote physical activity [26].

Paper-A Framework of Developing Mobile Gamification to Improve User Engagement of Physical…
• Start the route: In this activity flow, we designed for the player to investigate the prvious detail of statistics, change various settings in the game such as avatar, display name etc., before the player starts to play the game. • Route planning to tower map: After establishing a game account, once a player joins the route, a player icon is displayed on a minimap based on the player's GPS location. The map featured shows the "Tower" which navigates the player while running on the area. Our geolocation map is a real-time 3D map renderer generated from real-data geolocation of Chiang Mai University from Mapbox Vision which includes accurate data of latitude and longitude along with height map. • Run to the area of the tower: In this activity flow, we designed a game mechanic for the player to run until each checkpoint in order to catch the monster. The player can find the monsters only in the area of "Tower". The reason behind these mechanics is that we would like the player to feel the journey experience on the field trip between the land area of Chiang Mai University from point to point such as Forest, Faculty building and the beautiful Lake. • Capturing the monsters: In these mechanics, players run around the area of the tower until an egg of monster occurs then click to catch it on the mobile screen to collect monsters on inventory. To collect monsters, we designed two main types of collecting: aesthetic and taxonomic [27]. For collecting monsters, we separated the monsters into three classes such as rare, super rare, and legendary. The aesthetic collecting define are the object are not limit supply and adding things to collection depends on personal preferences, in our case, we design the player to catch in these types for rare and super rare monsters, score and time. For taxonomic collecting, we designed for legendary monster which improves motivation of players to catch both types of collecting. The three types of monsters consist of thirty species, the examples of monsters are shown in figure 3. • Finish route: If the player runs to catch the monster and checks in the whole "Tower" in the minimap, the player could finish the route by the checkpoint of the beginning then the finish screen l calculates the score, time and ranking of this route.
Defining the game elements: This process is very important for gamifying the system in order to select suitable game elements according to the flow diagram that we listed before. However, it is very difficult for the first design prototype with which all the game elements would fit to the game mechanic system. For the first loop of spiral, we designed to implement as many game elements as possible [24] with rewards, leaderboard, score system, and progress levels. In addition, the research of [22] and [23] studied the effect of each game elements suggest that the leaderboard and social interactions are the most effective ways to impact user engagement. Based on research suggestions, we are proposed the leaderboard and social interactions on the first priority to implement. Thus, we divided the game elements to implemented into two types: main game element (must be implemented in game sys-tem) and optional game element (choice). The following game elements were chosen to be implemented based on important priority in the Camt comic run App: Main game elements are defined as those that must be implemented in the core mechanic system.
• Leaderboard: The accumulation of score points, shows the names and current score points for the player and leading player. Leaderboards are the great performance of every player available to others for competition among players compared to other elements [22], [28]. • Score point: Is a numerical feedback when the user does an action [29]. In this system, points are added every time while users caught new monsters during their run. The bonus of points calculated based on the time remains and how much and rare the monster is when runners catch it. All point values are calculated each user's profile to get a real badge reward. • Map Progress Bar: In addition to showing information while running, we decided to put the map progress bar to notify the player progress to motivate how far to end of the route. Thereby, the player could monitor how far they run/walk to finish the goal.
• Inventory System/collection: Defined as the sense of ownership in the system through collection by picking up [30]. In our system, we provide an inventory system effectively eliminating the need for collecting the number of monsters that were caught by users. As long as players can afford a monster, storing it for rare, super rare and legendary kind of monster. Optional game elements are defined to pilot test before decision to exclude or include in the game mechanic system. • Choice: Defined as the player's ability to determine verdict among many possibilities [31]. In our design, we let players design their route planner themselves to run any Tower without any stick before/after. However, it may make players confused with a clear goal which tower to be targeted first. It is necessary to make sure every player keeps players inside the Flow Zone [34] without hesitation regarding which way to go. • Time pressure: Involves a specific constraint that demands the player to complete a route in a determined time [32]. This game element forces and pressures the player to finish the route over a limited time otherwise the player will lose the round. • Randomness: Is an element of Lottery (chance to get the big reward) within the system such as offering unpredictable outcomes every time when playing [35]. In our case, we designed a link with the collection of game elements to provide the system with a certain percentage chance of getting super rare and legendary monsters as 10% and 0.1% respectively which also include randomness of score point after getting super rare and legendary. Accordingly, even if users played a similar strategy, the final score would not be equal for each time to play.

Development, test and evaluation
Software development: The software of the mobile application was implemented by the Unity game engine version 2019.1.12. We decided to develop on this framework because Unity has features of cross-platform development on IOS and android operating systems which can reduce the time of development for android and iOS. For the centralized data, we used server on linux operating system with apache and mysql for exchange the data with json data interchange format. The server was placed at the College of Arts Media and Technology, Chiang Mai University.
Software testing: Once we developed the prototype of each cycle of the spiral loop, we then tested the prototype by functional testing which It mainly concentrates on four stages: 1) mainline functions: testing core main function of prototype, 2) basic usability: testing on basic usability of the system if there is any difficulties to use ux/ui.3) Accessibility: testing the accessibility of the system, 4) Error Conditions: testing whether bug or error messages are displayed. We also implemented two prototypes of application: the main game element and the optional game element in order to test the suitable game element in the next phrase.
Evaluation of gamefulness and game element: The objective of this phase was to evaluate for gamefulness in order to add/drop the suitable game element. For each cycle of spiral, the prototypes from the last phrase were developed to pilot test for considering the evaluation of each game element to the core game mechanics. A total of sixty individuals participated in the research and were divided into two groups, namely the control group and the experimental group. Each group contained thirty participants from the College of Arts Media and Technology, Chiang Mai University. All participants were selected by simple random sampling, agreeing with the research specifications.
We also recruited new participants who have never played it before. To evaluate the gamefulness of the system, we employed the game experience Questionnaire [33].
The Game Experience Questionnaire (GEQ) comprises thirty-four items which need to be marked up on a five-point likert scale. The GEQ is categorized into seven attributes: Flow, Tension, Challenge, Competence, Immersion Negative Affect and Positive Affect. Items in the questionnaire are presented as statements which are rated by respondents to indicate their experience while playing the game. Ratings are made on a 5-point Likert scale with anchors as follows: "0not at all", "1slightly", "2moderately", "3fairly", and "4extremely". For each attributes describe as: • Flow attribute comprises five questions which indicate the players in term of flow theory on loosing track of time and detachment as in game experiences. • Tension attribute comprises three questions related to player specific negative emotions. • Challenge attribute comprises five questions which evaluate the scores of player during playing game. • Competence attribute comprises five questions relating to how proud the players are when achieving the goals and becoming the winner. • Immersion attribute comprises six questions representing aspects of how to the construct of immersion is connected to the feeling of the players. • Negative affect attribute comprises four questions related to negative emotional experiences of the players. • Positive affect attribute comprises five questions related to positive emotional experiences of the players.
In our case, the evaluation was carried out in three times of spiral loop (see Figure  2). The participants of both groups were first installed on the mobile android version by re-searchers. Each participant was asked to individually play until they finished the route, after which all participants were asked to individually fill in the Game Experience Ques-tionnaire (GEQ). Then, their qualitative data was collected by short interview session by researchers. The participants of the groups didn't know whether they played the main version (control-group) or the alternative version (experiment-group). The result of the first time of the spiral loop carried out in order to evaluate the game element of choice is shown in    The graph of comparison of GEQ of mean scores is shown in Figure 8. The graph shows the group GCV defined as Game element of control version which version of game implements only the main game elements and GAV with choice defined as Game element of Alternative version with choice game element which version of game implement to evaluate the effect of optional game elements (choice). The notable results of choice significantly decrease in Immersion, flow and positive effect. Accordingly, this game element of choice showed the negative effect to players even if the competence is higher but overall it is negative, which is completely not in line with our expectations. To find the reason with qualitative short interview, many players reported that they feel confused about the route they should follow for the next destiny, which caused some participants deciding to quit the gameplay. Statistical significance was still not achieved as well for the Immersion: flow and significant in terms of positive effect: Again, for the second cycle of spiral loop, we evaluated the game element of Time pressure shown in Figure 9. The graph shows group GCV and GAV with Time pressure defined as an alternative version with Time pressure game element which version of game implement to evaluate the effect of optional game elements (Time pressure). Accordingly, this game element of Time pressure also showed statistic significance in terms of negative effect (Negative effect: Mean (1.86, 3.12) = 0.01, P < .0.05) to players even the challenge is not as high as we expected. To a qualitative short interview, the negative effect reported by the players who couldn't compete with others but enjoyed playing the game by walking around the natural environment. In summary, the Time pressure has a negative effect for intrinsic motivation by freedom of fun, enjoyment, and satisfaction by itself. Thus, for the second loop, Time pressure element have not been implemented.
Finally, we evaluated the last cycle of spiral loop, the game element of randomness shown in Figure 10. The graph shows the group GCV and GAV with Randomness defined as Alternative version with the Randomness game element which version of game is implemented to evaluate the effect of optional game element (Randomness). Surprisingly, randomness showed a positive effect on players with positive and challenge factor and overall still slightly increase. In terms of interview sessions, even this element can affect the game's balance because some players can obtain big rewards compared to others but players are also reported as the fun and special reward which can provide every route they are excited for replaying value. Statistical significance was well achieved for the Flow and challenge: (Flow: Mean (2.37, 2.81) = 0.001, P < .0.05), (Challenge: Mean (2.05, 2.65) =0.001, P < 0.05) as shown in Fig 10. Finally, we decided to implement the game element of randomness to the final game version. It is to note that for evaluating the loop we also fixed the various bugs of the software reported by players. The summary of the overall game elements implemented in the core game mechanics is shown in Table 2.

Planning the next iteration
In this phrase, iteration is set for 5 days in order to prepare to start the new spiral. Before starting the next iteration plan, we selected the problem and the idea of the game elements which can be improved by the next iteration. After the meeting, each member started to plan the next iteration according to the results from the section 3.

Health Promotion Evaluation
We want to highlight our goal for this section to test our application for perception of use and feasibility of camt comic run for health promotion evaluation in order to adapt the system for a larger-scale use, engaging physical activity in long term study. Twenty participants were recruited from various students including employees and lecturers in Chiang Mai University. The condition of participants were: (1) aged between 18 -40 years old, (2) have physical activity at least 1 time per week around Chiang Mai University, (3) is able to use devices such as smart devices, (4) have access to android or ios smartphones. The health promotion evaluation spans over one month including gathering two data sets. (1) Baseline on week 1-2 gather data without using Camt comic run, (2) intervention on week 3-4 by using Camt comic run. After that, forty participants were randomly assigned into two groups: a gamified group, Health promotion mobile app with Camt comic run and a non-gamified group, normal physical activity based on a mobile app monitor by Google fit. The participants also installed an Android version of our application during the study. We then asked an open-ended question at the end of study to collect feedback, the overall step is shown in Figure 11. The Gamified group (using Camt comic run) in week 3-4 showed an increasing rate of active physical activity of running but the Non-Gamified group (using Google Fit) remained similar to the baseline (see table 3). Based on a short study for intervention, the results showed significance mostly in participants who have less physical activity than physical activity guidelines [36] at least 150 min/week (average % change are: +57.86%, +205.49%,+157.71%,-3.9%) while do not change for the participants who get enough physical activity standard per week. For the open-ended question, we recognize that the main driver of motivation for participants to engage is to collect the new monster to collect and compare the best score of round to another participant in the leaderboard.

Frameworks for designing gamification
This study proposes the framework of gamification implementation method in healthcare context for mobile application. Our framework is composed of four phases adapted from the spiral model: objectives determination; core game flow definition; development, test and evaluation. The other gamification framework of healthcare [61] had four main stages: theory and modelling, piloting, evaluation, and implementation and [62] presented four phase: people, aesthetics, technology and context. Differently, even the above of framework has similar phases to our approach but they had not proposed how to select the game elements into game design; we proposed the GEQ to evaluate game elements applied to game design for each iterative of spiral model. However, [12] proposed game elements selection in framework, but their framework was too complex to implement with composed seven stages.

Perception of use for application
Overall, the application improved physical activity engagement rate of the participants from gamified group and non-gamified group than physical activity guideline (+57.86%, +205.49%,+157.71%,-3.9%)). Thus, the results showed that implementing the gamification concept could led to successful behavior change and healthcare motivation improvement of the participants. The previous studied of gamification of healthcare were consistent with our result which showed positive outcome [63], [12], [64], [65].
Unfortunately, previous study reported the effect of gamification can increase physical activity (ex. Pokémon Go) only for small amounts over relatively short times [68] - [70].However, the study [66], [67] suggested to add new small challenge of game elements frequently in order to keep the users' engagement. Based on this assumption, the approach of game design for Camt Comic run can deployed the new route of runner application which is designed to blend in the surrounding environment for immersion and entertainment. In additional, this application can flexibly be used in marathon event such as trail running and Fun run. Moreover, based on our framework, the application can create the runner's journey to increase extrinsic motivation [71] by providing new route which aims to provoke curiosity.

Conclusion and Future Work
This research proposed the framework of developing a mobile gamification to improve user engagement in physical activities. We also introduced various experiments from development phase up to evaluation phase, so that we can apply the best element to Camt Comic application. We purposed the application of location-based augmented reality mobile game for our case study. The four phases of the spiral model provided practical insights into the guideline of development for a healthcare application including iterative steps for process of fun and engagement to select suitable game elements. The results of a small group showed that gamification increased the engagement and motivated participants who have less physical activity than the standard guidelines but the application cannot improve the time nor can motivate participants who reach the standard guideline of physical activity.