## 6 Conclusions  
PEL (Personalized Exergames Language) has been defined to allow for the automatic generation of customized exergames within the context of the physical rehabilitation of patients affected by stroke. PEL relies on gITF, an open standard that is devised to efficiently send and load 3D models and scenes in applications. Particularly, the design of PEL was discussed paying special attention to the lexical and semantic aspects, since the syntactic component depends on the JSON format, which is used by gITF. The underlying software system is able to generate and execute exergames from PEL sentences.  
A methodology for the effective design and generation of personalized exergames has also been proposed. This methodology follows a five-step process: (i) exercise definition, so that the therapist can establish the therapeutic objectives, (ii) definition of the interaction scheme between the patient and the exergame, typically through the definition of the trajectory of the rehabilitation movement, (iii) definition of feedback and motivation mechanisms, so that patients are engaged when performing the exergames, (iv) definition of metrics to measure the patients' performance and monitor their progress, and (v) generation of the exergame, an automatic process that transforms the exergame definition in PEL into an actual exergame that can be executed.  
A number of exergames, defined while using PEL, were generated in order to assess how patients and therapists from one hospital and two community centers perceived the exergames understanding and suitability. From a general point of view, the feedback they provided was very positive, when considering that one of the potential uses of the system consists in performing the exergames at home. This feedback has been studied to improve specific aspects of the rehabilitation system, which have been integrated in the current prototype.  
This first version of PEL, and the underlying software that automatically generates personalized exergames from PEL sentences, opens the door to potential improvements, such as the integration of authoring tools that can be used by therapists in order to graphically define exergames. These tools, like the one introduced in Section 3.2, will have to include a software module that is able to translate  
Figure 6: Visual aspect of the graphical user interface for the patient after the integration of some improvements. The feedback was obtained from the questionnaires completed by patients and therapists.  
the visual definition of exergames into PEL sentences. From them, it is now possible to automatically generate exergames. At the same time, representing the exergames with sentences that can be processed by a computer facilitates the automatic personalisation of rehabilitation routines, depending on the dynamic evolution of the patient's progress. Another potential line of work would involve the integration of the care-giver avatar by expanding the setup component devised in PEL. Thus, the care-giver could physically assist the patient when he/she cannot perform the exergames in an autonomous way. Because the used hardware can track multiple bodies, this would be possible from the technical point of view. However, aspects, such as the impact of partial occlusions and data filtering, should be carefully assessed.  
Conceptualization, D.V., C.G.-P., and C.G.-M.; Methodology, J.J.C.-S., D.V.; Software, C.G.-P.; Validation, J.A., J.J.C.-S., C.G.-M.; Investigation, J.J.C.-S., D.V.; Visualization, J.A., C.G.-M.; Writing--Original Draft Preparation, C.G.-P., D.V.; Writing--Review & Editing, J.A., J.J.C.-S., and D.V.; Supervision, D.V.; Project Administration, D.V.; Funding Acquisition, J.A., J.J.C.-S., C.G.-M., D.V. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Instituto de Salud Carlos III grant number DTS18/00122, co-funded by European Regional Development Fund, European Social Fund \"Investing in your future\".  
The authors declare no conflict of interest.