Abstract
Exergames—video games designed for physical activity and rehabilitation—are powerful clinical tools, but their development often requires high-level programming skills that therapists and medical researchers lack. This paper introduces PhyDSLK, a model-driven framework that enables individuals with no prior game development experience to create custom, Kinect-based exergames. By utilizing a specialized Domain-Specific Language (DSL) and automated code generation for the Unity engine, the framework allows users to build functional, engaging games in approximately one hour.
Introduction
There is a significant "development gap" in the creation of exergames. Effective rehabilitation software must balance clinical goals with engaging gameplay and smooth hardware interaction. Traditionally, this requires proficiency in General-Purpose Languages (GPLs) like C# or Java. This creates a barrier for the people who understand clinical needs best: clinicians. While some tools exist to create simple "virtual gym" exercises, there is a lack of accessible frameworks for creating interactive, physics-based 2D games (such as shooters or platformers) that utilize natural user interfaces like the Microsoft Kinect.
Methodology
The authors employ Model-Driven Software Engineering (MDSE) to bridge the gap between a designer's mental model and executable code. The framework, PhyDSLK, consists of two primary stages:
- Model Specification: Designers use a specialized plugin for the Eclipse IDE to write code in PhyDSL, a high-level language. Instead of managing memory or physics engines, the designer answers five conceptual questions: Who is the player? Where do they live? What are their challenges? What are their goals? What are their available actions?
- Code Generation: The framework uses the Acceleo transformation language to turn the high-level model into executable C# scripts for the Unity game engine.
To keep the generated code clean and maintainable, the authors developed the Pure Code Abstraction Library (PCAL). This library encapsulates the "static" code (standard Unity and Kinect boilerplate), allowing the generator to focus only on the "dynamic" logic specific to the designer's game.
Evaluation and Results
The framework was evaluated using three benchmark exergames of increasing complexity: KeepTheBalloons (simple), PopTheBalloons (medium), and AlienMiner (complex). An empirical study with 14 participants measured development effort and usability:
- Development Efficiency: On average, participants spent only 1.09 hours to develop an exergame, regardless of its complexity.
- Code Abstraction: High-level models ranged from ~105 to ~250 lines of code. This represents a massive reduction compared to the thousands of lines of C# code required to build these games from scratch in Unity.
- Usability: The framework achieved an average System Usability Scale (SUS) score of 80.4, which is considered "excellent" in the field of Human-Computer Interaction.
- Accessibility: Undergraduate students with zero experience in Unity or Kinect became proficient with the tool after only 100 minutes of training.
Key Insights
One of the most striking findings was that the time required to develop a game did not scale linearly with its complexity. Because the DSL abstracts the "heavy lifting" of physics and sensor integration, designers could build a complex game like AlienMiner in roughly the same time it took to build a simple one.
Additionally, the framework reinterprets standard UI concepts for the Kinect. For example, "touchscreen enabled" properties in the original DSL were mapped to "soft" or "hard" virtual hands in the Kinect space, allowing developers to toggle between overlapping objects or physically colliding with them without writing new collision logic.
Conclusion and Future Work
PhyDSLK demonstrates that model-driven engineering can successfully democratize game development for clinical purposes. While the initial results are promising, the authors acknowledge the need for further validation. Future work will involve actual therapists and clinicians to ensure the DSL aligns with their professional vocabulary. Furthermore, the authors plan to conduct "in-vivo" testing to measure actual rehabilitation outcomes for patients using games generated by the framework, and expand the DSL to include more complex lower-limb gesture recognition.
Summary updated