1 Introduction

Ankle sprain is a common trauma, 80%–90% patients can recover by non-surgical treatments. Prolonged immobilization of ankle sprains is a common treatment error [1]. Medical experts encourage patients to do proper rehabilitation training exercises after ankle sprains, which can reduce the risk of pain, swelling and effusion, prolonged recovery time, reinjury, and even chronic ankle instability (CAI). Therefore, patients should take active part in rehabilitation exercises after ankle sprains.

Although medical theories and practices in ankle rehabilitation are well developed, many patients ignore the necessary exercises. Athletes who value their athletic ability usually have professional help from their physical therapists. Patients after CAI surgical treatments are monitored by clinicians to complete the rehabilitation training plan. But for other patients who take ankle sprains not a serious problem, they usually have a busy life and find the rehabilitation training monotonous and boring. Additionally, patients at home do not have a clinician’s or a therapist’s supervision and help, which may lead to wrong and inefficient exercises. As a result, although the medical research in ankle rehabilitation is well developed, the ankle rehabilitation training in practice is neither effective nor efficient enough.

In order to increase patients’ motivation for ankle rehabilitation training after ankle sprains, this paper tries to provide an interactive training system by gamification design method. There are 3 stages of ankle rehabilitation training process, which are early functional rehabilitation, intermediate functional rehabilitation and advanced functional rehabilitation. Because the complete rehabilitation training program involves many different kinds of exercises, it is a heavy workload to build an overall training system that covers all the 3 stages. Thus, this paper focuses on balance training, which is extensively used in the second and third stage of ankle rehabilitation training. Balance training consists of bilateral and unilateral stance on different surfaces with or without resistance and perturbations. Balance training is simple and convenient for household training but balance training without variability and perturbation may not be adequate for forces that challenge neuromuscular system at the highest levels [2]. As patients are recovering gradually, balance training settings (different surfaces, postures and with perturbations, etc.) need to upgrade accordingly. However, most people will not prepare these devices and do not have professional help at home, so balance training at home lacks variability.

As discussed above, this paper intends to solve two problems of balance training of ankle rehabilitation: people can hardly keep daily training because of the monotonous process; for better rehabilitation effects, balance training requires variation which is convenient for household use. To solve the problems, the interactive training system introduces gamification design. With the help of sensors, it is easy to acquire related data of people’s exercises. The training system can be used in personal computers which are convenient for household use. This paper shows a way to improve the effects and experiences of ankle rehabilitation process by turning the traditional training plan to an exergame for patients to do rehabilitation at home.

2 Design and Development of the System

2.1 Balance Training Model

Although it is important to individualize each rehabilitation program, medical experts have developed mature rehabilitation training templates that patients in different periods of recovery can adapt with. Therefore, the interactive training system for ankle rehabilitation is based on the research of the mature training templates.

As explained in the introduction, the interactive system is designed for users to keep balance training every day at home. Based on previous study, it appears that balance training after acute ankle sprain substantially decreased the risk of recurrent ankle sprains [3]. Balance training is bilateral and unilateral stance on different surfaces and devices and it requires repetitive exercises every day. According to Mattacola and Dwyer [4], in the intermediate functional rehabilitation training stage, patients can stand on the rotating wobble board and try to keep balance for a while. As the patient is recovering gradually, this exercise can be progressed by changing the size and surface of the board, visual input and weight-bearing. In the advanced functional rehabilitation stage, balance training can be progressed with rubber-tubing resistance or after light perturbations from the clinician. These perturbations caused by active movements or external push can provide more challenging exercises for ankle rehabilitation. The conditions and devices of balance training can vary vastly so that patients can be challenged constantly during the rehabilitation process. One major drawback of this training method is that people cannot have all the requested devices, nor the clinicians’ help when training at home. For example, one advanced method of balance training is that the patient, standing on one leg on a trampoline, keeps throwing and catching a gym ball with the clinician. However, this kind of exercise is normally performed in a clinic with enough space and professional devices. As a result, although clinicians suggest taking exercises of balance training after ankle sprains, people cannot adhere to the rehabilitation training plan very well at home. A common mistake when performing proprioception and balance exercises is the lack of variability in speed and intensity [4]. In addition, people easily get tired of the monotonous training mode, unilateral stance on floor or on a wobble board.

As discussed above, the basic form of balance training is bilateral and unilateral stance on certain surface. Bilateral stance of balance training needs to be done on the wobble board and had better be performed under a clinician’s supervision. Thus, this paper selects unilateral stance as the training contents (see Fig. 1). In Fig. 1, the person stands akimbo while in practice, the arms can be out to side or across chest according to individual conditions. After studying existing cases, it can be found that many commercial rehabilitation platforms are based on Kinect, a motion sensing input device. A classic example is one exergame for arm rehabilitation on the rehabilitation platform, MIRA. In this game, the user can control a bee by doing elbow extension and flexion to fly up and down to gather pollen to deposit in beehives, all while avoiding the other bugs. The game goal is not hard to achieve because the real goal of the rehabilitation game is to help the users to finish enough training exercises. But with the help of the game, the amount of arm rehabilitation exercises can be counted and shown on the user interface so that when users achieve the game goal, the training plan is executed at the same time. With the instant visual and aural feedback, users’ attention can be attracted during the process. Many rehabilitation training software platforms use Kinect as input device because those exercises are repetitive movements and easily to be monitored by a motion capture camera, such as stand-up and sit-down. There are different kinds of sensors to acquire data of exercises and for ankle rehabilitation training system design, an input device is also necessary.

Fig. 1.
figure 1

Posture of unilateral stance of balance training

From the description of balance training above, it can be concluded as one’s body standing straight for a short time, which is easy to be captured by Kinect. However, if the system is designed to only record users’ training time daily and return some virtual rewards when the training task is done, the experience of gameplay is still not enough, and the design of progress path is monotonous (increasing the balance time and changing the posture of arms). In addition, without the help of multiple devices and clinicians, this balance training plan lacks the variability in speed and intensity. Because it is a training system used for household, internal perturbation is chosen to make the exercises more interesting and challenging. Internal perturbation can be linked with the design of video games. Users can break the balance state by shifting the center of gravity to control the game element on digital screen to achieve the game goal. When you stand on one leg, your standing foot forms your base of support. The center of gravity is above the center of your base to balance, hence acquiring the pressure center of your foot can describe the balance training exercises. And many external ankle support devices also provide feedback of pressure sensors during exercises. Therefore, pressure sensors are adopted as the input device in the system design.

In summary, to solve the problems of balance training of the traditional ankle rehabilitation, the system is designed for users to do unilateral stance training, to break and return to the balance state according to the prompts and feedback of the game interface. This newly designed system takes into account the basic method of balance training and necessary variability during the training process. Because it adopts the way of internal perturbation (the balance state is interrupted by the user’s own movements), many different professional training devices are not needed. And with the game design, the balance training can be progressed by increasing the difficulty of the game. In the section that follows, the rules and progress path of the rehabilitation game will be elaborated.

2.2 Rules of the Game

The game rule design of balance training focuses on 2 purposes: (a) to encourage users to keep balance, and (b) to provide some perturbation to break the balance occasionally. Playing the game means to control a game element by keeping and breaking balance to interact with the other game interface according to game rules.

Gameplay.

As the user receive feedback on how they perform from the game interface, the information provided on the interface will affect the user’s next move and interest directly. Therefore, the game rules and the interface are designed to be intuitive and readily comprehensible, which conform to the context of ankle rehabilitation. Thus, when the user is in the state of balance, the player character in the game stays in the same position. Positive feedback and rapid rewards added at the right timing are indicators of success, which is an important feature for motivation [5]. Thereby when the user succeeds in keeping balance on one leg, there are awards in a line to be obtained (see Fig. 2), which can add game scores. The awards are moving down in a straight line and according to the theory of relative motion, it can be seen as the player character is moving up as well. When the player character runs into an award item, the scores of this round add 10. To add variability to the balance training, interferent items will come from the above randomly to hit the player character (see Fig. 2). If the player character was hit, the scores of this round will subtract 100 for each hit. Therefore, the user needs to shift the center of gravity to respond to the disturbing and the movements will invoke perturbation while maintaining balance. The player character can move in one dimensional. But when the users shift the center of gravity to left or right, their body cannot move straightly. In unbalanced state, people wobbles and as well as the center of gravity. Therefore, although the player character can only move to left or right, the users’ ankle joint can be challenged in different angles and postures. Therefore, to minimize users’ cognitive demand, one-dimensional control of the player character is applied.

Fig. 2.
figure 2

Diagram of the game design of ankle rehabilitation

Game Goal.

Balance training plan is usually designed as a round for a short time like 20 s. It is repeated 5–10 times as a set of exercises. And patients need to do 2–3 sets of the balance training exercises every day [4, 6]. The duration and frequency of balance training plan can be designed as game settings. The ankle rehabilitation game is designed in timing mode. When the time of one game is up, one time of balance training is completed. 5 times as a set so when 5 games are finished, a small prize will be provided to encourage users. Likewise, after achieving 3 small prizes, a big prize will be provided, which means today’s training task is accomplished.

Progress Path.

Thus far, the interactive system of ankle rehabilitation is generally shaped. In addition, it is important to design the progress path of the ankle rehabilitation game because during the recovering process, the difficulty of the game needs to be leveled up to meet the demand of training intensity. And according to the flow theory, the progress path can make users remain engaged during the rehabilitation process [7].

In consideration of different individual conditions, clinicians can choose and adjust the training plan for each patient because with the help of the e-platform, clinicians can view the patients’ training logs, which are more accurate than patients’ personal statement. When training at home, the training game will level up in accordance with the users’ performance (e.g. game scores). The rehabilitation training system is progressed in 3 aspects (see Fig. 3): (a) the frequency of interferent items’ occurrence increases, (b) the velocity of interferent items increases, and (c) time for one game prolongs. In this way, the users’ ability of balance and response to perturbation improves.

Fig. 3.
figure 3

Diagram of the progress path of the interactive system

The higher score of a game means better balance ability and better control of ankles. Therefore, when scores increase, the difficulty of the game should be increased. The score is calculated as followed.

$$ {\text{Score}} = {\text{Game}}\,{\text{Time}} \times 1 0 0+ {\text{Award}} \times 1 0\, - \,{\text{Interferent}} \times 1 0 0 $$
(1)

Therefore, when the game levels up, the basic scores increase since the game time increases. And as time prolonged, more award items are available, so the scores will go up. But because of the more frequent and faster interferent items, it is more challenging for users to avoid them. Hence, the scores may decrease when the game becomes more difficult. The system can adjust the difficulty level of balance training gradually based on users’ game performance. As seen in Fig. 3, it can be inferred that the progress path of the training game is an iterative process. By this means, people can do progressive balance training at home under guidance. Moreover, increase in difficulty of the game is an indicator of outcomes of rehabilitation exercises.

2.3 Hardware and System

As previously stated, the input data to describe the exercises is pressure center of the supporting foot. In order to simplify the development, Sensel Morph is used in this case (see Fig. 4). Sensel Morph is a multi-touch, pressure sensitive, and reconfigurable control surface for artists, musicians, coders, and other creative people. Because the foot pressure center cannot be calculated by single sensor, a multi-touch, pressure sensitive device is necessary. And Sensel Morph can meet the demands of the system development. Sensel Morph with different Overlays can adapt to many different tasks – playing music, editing video, drawing, playing games and so on. It also provides open source Sensel API for programmers to create new programs that interact with a Sensel. With the functions in Sensel library, the data acquisition and processing can be quickly set up. Sensel Morph can support systems of macOS, Windows, Linux, Android and iOS and languages of C, Python and C#. And because the game development is based on the pygame library of Python, the input coding also uses Python as the developing language. Sensel Morph can be connected with USB or wirelessly via Bluetooth 4.0LE.

Fig. 4.
figure 4

Sensel Morph – pressure sensitive pad used to acquire data

As explained earlier, the users control the game character by shifting the body, thereby the parameters used are Coordinates and Contact to calculate the y offset value. And initialization to identify the coordinates of the center of gravity in balance is designed. Before starting the training game, the users are asked to stay balance for 5–10 seconds for the system to record the initial coordinates of the pressure center (Fig. 5). People cannot keep absolutely still thus coordinates in a small wave range can be supposed in balance.

Fig. 5.
figure 5

Visualization of foot pressure

The algorithm of input data needs to be adjusted through user experiments so that the users can link the changes of gravity center with the displacement of the player character unconsciously. The unit length of displacement is designed in 3 levels and 10 users for each group. After experiments, they are asked to choose the experience (too fast, moderate, too slow). The experiment is repeated but narrowed down the range of the 3 unit lengths to optimize user experience.

The hardware of the system consists of 2 parts: a pressure sensor board and a computer (see Fig. 6). Personal computers and laptops are accessible to normal family.

Fig. 6.
figure 6

Hardware of the ankle rehabilitation system

2.4 User Interface

In this section, the user interfaces of a complete training process will be demonstrated. With the high-fidelity interfaces display, the gamification design of balance training can be better understood. To make the game goals and rules easily comprehended, the settings of story is applied. And ice skating can be linked with balance training. Additionally, story and character settings can make the training game more amusing and appealing.

Introduction and Task Table.

When entering the system, a simple instruction of the training method is the first page. And you can tick the option of “not show again” then this page will not appear next time. After you click on the button “Got it”, it jumps to the page of the task table. The task table illustrates the goal of today’s training and current rate of progress. For example, in Fig. 7, the balance training plan is designed as 3 sets of 5 repetitions. The visualization of the training frequency can encourage users to carry out the plan.

Fig. 7.
figure 7

User interface of introduction and training task table

Initialization and Countdown.

After clicking on the button “Start”, it jumps to the page of initialization. On this page, there are simple instructions of postures and a dynamic loading icon. The loading icon is filling with color to indicate the progress of the initialization. After the data of balance state is recorded, it will automatically jump to the countdown page. The countdown page is designed for users to get ready for the game start as it is a timer game and starts immediately (Fig. 8).

Fig. 8.
figure 8

User interface of Initialization and countdown

Game Interface.

As mentioned previously, the game interface is designed on the basis of the diagram of the game design (see Fig. 2). The player character is set as a penguin slider (see Fig. 9), who can slide to left and right. The award items are set as fish, which can be easy to understand as rewards for the penguin. The big snowball represents the interferent items, which will slide from the above to hit the penguin. And as the snowball hits the penguin, animations of crushing into pieces are added to clarify the negative feedback. Furthermore, audible effects of obtaining the fish and being hit by the snowball are along with the visual effects to improve game experience. The shore side and fish are moving down so that it seems that the penguin is going forward. Story setting has a positive effect on comprehension of game rules and goals. Moreover, the game score is displayed with real-time changes as instant feedback.

Fig. 9.
figure 9

Game interface

Game Results.

The game ends when time is up, then the page of results appears automatically. 3 number are listed (see Fig. 10): game scores, times that got hit, times of obtained fish. And the remained exercises of one set are reminded as well. And when one set of training exercises is finished, a grander congrats page will appear. Likewise, a new congrats page for one day’s task is provided. The users can check their own rehabilitation outcomes by the game results. In contrast to traditional ankle rehabilitation training, the users can see the progress after exercises of each time.

Fig. 10.
figure 10

Interface of game results

3 Evaluation of the System

An initial evaluation of the system has been carried out with two patients after ankle sprains (Fig. 11). The participants’ profiles are in Table 1. The two participants are asked to take the ankle training with the interactive system for one week (3 sets of 5 repetitions for one day). The training contents are explained ahead, but everyday task is not compulsory for them.

Table 1. Participant profiles

The two participants both show great interest in the training plan because they express that they have the problems of keeping rehabilitation exercises. The two participants completed all the training tasks willingly and showed evident progress during the experiment process. After insisting balance training for one week, they have been asked to evaluate the motivation and engagement for the interactive system by the Intrinsic Motivation Inventory (IMI, see Table 2). Four sub-scales are adopted in the questionnaire: Interest/Enjoyment, Perceived competence, Effort/Importance and Tension/Pressure. The statements are listed out of order for reliability.

Table 2. Intrinsic motivation inventory of interactive ankle rehabilitation system
Fig. 11.
figure 11

Participants training in the experiment

The IMI scores shows a positive result of the interactive system (see Table 3). The two participants both thought that this training method was enjoyable, and they could feel the balance ability improved during the training process. Owing to the feedback, it could help them keep doing daily training exercises. They need some time to get acquainted with the game, but they could master the game after one game. Nevertheless, they proposed a complete training system covering all the stages and different exercises. And they also expressed worries on long-term effects since training of first week is still fresh and novel for users.

Table 3. Results on IMI of interactive ankle rehabilitation system

4 Conclusion and Discussion

The interactive training system of ankle rehabilitation applies gamification design method to improve motivation and engagement, focusing on balance training. Meaningful feedback is provided to make the training process more interesting and interactive. In addition, the digital platform can help to record and reflect the training process as reference for both patients and clinicians. And the progress path is designed to provide the needed challenges for different periods of recovery. The result of the initial evaluation is positive generally.

How to ensure the contents and intensity of rehabilitation exercises are appropriate and effective is a significant issue in the research. Furthermore, with the accumulated training data, clinicians can optimize the training system and provide more diversified game experiences.