# Leveraging Grammarware for Active Video Game Development
## 1 Introduction  
Software development is a resource-intensive process, requiring significant investments of time and money. Despite substantial progress in development tools and methodologies, the increasing interconnectivity of modern systems continues to introduce additional layers of complexity. Modern software must strike a delicate balance: it must be highly user-friendly and integrate seamlessly with digital ecosystems while remaining adaptable to diverse user needs and capable of interoperating within complex environments [1]. This paper explores the application of a DSL through the development of an active hockey stick-handling video game, addressing key challenges such as dependency decoupling, connectivity, extensibility, flexibility, and maintainability. The rising popularity of video games and the corresponding increase in inactive lifestyles have raised significant health concerns among players, including obesity, postural issues, and spinal problems. In response, researchers and engineers have turned to AVGs as a potential solution. These games shift the focus from traditional keyboard-and-mouse interactions to body-oriented engagement, requiring players to use physical movement to interact with the game [2, 3, 4]. Designing a purpose-built platform for AVGs involves balancing the competing demands of connectivity, scalability, and standalone functionality. For example, the Game Chang Classic (GCC) platform, designed to enhance puck control, reaction time, and overall skills in ice hockey stick-handling training [5], lacks connectivity, user configurability, and scalability, limiting its potential for broader applications. To address the need for flexible, user-configurable game design in sensor-driven training systems--while maintaining cross-platform consistency and long-term maintainability--we pose the following researchquestion: How can we achieve flexible and user-configurable game design in sensor-driven training systems while ensuring cross-platform consistency and long-term maintainability? This paper introduces a grammarware-based approach to software development for specialized, sensor-driven devices. The proposed method facilitates seamless integration with various systems, including cloud services, mobile applications, and external hardware components. The main contributions of this paper are as follows:  
* Novel DSL for AVGs: We introduce a modular and extensible DSL for defining AVGs. It supports time- and event-based gameplay, sensor configuration, and state annotations. We demonstrate the DSL's extensibility by introducing new features with minimal effort. Applying grammarware principles ensures cross-platform consistency and reduces system complexity, enabling a broader range of use cases. * Configuring a dedicated system with a dsl to act as a mobile game controller: A novel use of the DSL is demonstrated, where the flexibility of DSL-defined games enables the system to function as a remote controller for a mobile video game. This functionality is achieved without requiring modifications to either the software or hardware, illustrating how grammarware allows devices to operate beyond their originally intended purpose. * Optimization problem constraints defined by DSL programs: Implementing and parameterizing optimization problems are typically complex and time-consuming tasks. This complexity is reduced by utilizing DSL programs to define constraints and objectives directly. Instead of hardcoding parameters, the optimization process relies on DSL-based specifications, improving both flexibility and readability in game generation tasks. * Case study of a GCBLE system: We present the GCBLE system as a real-world case study of grammarware in development. The system demonstrates the practical benefits of using a DSL in a connected, sensor-based training environment. This paper is structured as follows: Section 1 introduces the research context and objectives. Section 2 reviews related work, establishing the foundation for our approach.