# Emotion-Driven Music and IoT Devices for Collaborative Exer-Games
## 6 Conclusions and Future Work
### Conclusions  
In this paper, we presented a technological solution to enhance exer-games through the integration of emotion-based music. The system is designed for IoT-based games and consists of a service-oriented infrastructure that integrates smart devices, artificial intelligence models, cloud technologies, and online _Spotify_ resources. During gameplay, players' emotions are monitored and used to influence the progression of the matchesthrough music. Musical stimuli are generated to regulate players' affective states and induce changes in their physical performance. These stimuli are personalized to maximize the impact of music-based interventions on participants, with the emotional responses of players providing further insights into the effectiveness of these stimuli.  
The paper focused on presenting those Spotify-based systems involved in the recommendation of personalized music from an affective perspective. These systems leverage the data and resources provided by that music provider to offer the functionality needed to achieve the requirements involved in the generation of stimuli: the recognition of the emotions that _Spotify_ songs are likely to evoke in players (requirement R2), the recommendation based on emotions (R3), and the characterization of players' musical preferences based on their listening habits in order to improve the recommendations (R4). The integration with _Spotify_ allows to have available a large-scale catalog of songs and to automate the capture of participants' musical preferences. This contributes a novel and appealing approach to the system. Note that these music-based requirements need ideally to be combined with the recognition of players' emotions during the physical activity (Requirement R1) and the configuration of stimuli (R5). The solutions proposed by the authors in [53] were adapted to the Empatica device in order to accomplish RequirementR1, while R5 has to be addressed during the programming of concrete games.  
One of the key advantages of the proposed solution lies in the use of Azure Durable Functions for the orchestration of music services. This serverless, event-driven architecture reduces operational complexity and provides scalability without the need for extensive infrastructure management. By enabling stateful workflows, Azure Durable Functions allow for the execution of long-running processes such as emotion recognition and music recommendation while optimizing resource consumption. The pay-per-execution model of this serverless approach also reduces costs, making it more accessible for large-scale deployments and adaptable to varying workloads in real-time gaming environments. Additionally, the inherent fault tolerance and auto-scaling capabilities of this architecture ensure system robustness and reliability during game operation.  
This proposal represents a significant advancement in the role of music and emotions in the design of exer-games. To the best of our knowledge, the combination of these two elements to guide gameplay progression and regulate player performance during physical tasks has not been explored previously. Another key contribution is the real-time monitoring of players' emotions and their integration into game decision-making processes. This affective dimension enhances the effectiveness of the stimuli, enables the assessment of their real impact, and facilitates the application of personalization strategies that improve the overall gaming experience.