Project

WatchOut

Distributed real-life game simulation inspired by the classic game of hide-and-seek.

The system combines game logic, peer-to-peer coordination, and real-time sensor data processing, simulating a physical game played by participants equipped with smartwatches.

Each player is represented by an autonomous process running on a smartwatch, responsible for movement logic, coordination with other players, and health monitoring. Players dynamically organize themselves into two roles: a single seeker and multiple hiders. The seeker attempts to tag hiders by moving toward their positions, while hiders aim to safely reach a shared home base without being caught. The game takes place on a virtual pitch represented as a grid-based environment, where players move according to a simplified physical model and continuously update their positions.

A key aspect of the project is its fully decentralized coordination model. Players communicate directly with one another using gRPC to elect the seeker through a distributed consensus algorithm based on spatial proximity to the home base. During gameplay, access to the home base is regulated through a distributed mutual exclusion protocol, ensuring that only one hider at a time can occupy the safe zone. The end of the game is detected collectively by the network of players, without relying on a central authority.

Alongside gameplay simulation, WatchOut integrates a real-time health monitoring system. Each player process simulates a heart-rate sensor using a photoplethysmography-based model and periodically generates physiological data. These measurements are processed locally using a sliding window technique to compute averages, which are then sent to a centralized Administration Server through RESTful APIs. This allows a game manager to monitor the physical condition of participants and intervene if abnormal values are detected.

The system architecture also includes an Administration Client used by the game manager to start the game, broadcast messages via MQTT, and query aggregated health statistics. The Administration Server acts as a coordination hub for player registration, data collection, and statistical analysis, while maintaining thread-safe access to shared data structures under concurrent requests.

P2P MQTT Java
Period 2024 - 2025
Platform PC

Use arrows to browse media