JS

Escape to Mars

Type: Interactive Game Role: Developer Year: 2025
JavaScript GSAP Micro:bit Bluetooth API CSS3 HTML5

Overview

Escape to Mars is a browser-based interactive space game that bridges physical and digital interaction. Players use a micro:bit controller connected via Bluetooth to navigate through an asteroid field, making this a unique hardware-software hybrid project.

Key Features

  • Micro:bit Bluetooth pairing for physical controller input
  • GSAP-powered animations for smooth asteroid movement and ship controls
  • Multiple UI states: home screen, game HUD, and end screen with statistics
  • Real-time collision detection and scoring system
  • Asteroid dodging mechanics with progressive difficulty
  • End-game statistics dashboard showing performance metrics
  • Responsive design that adapts to different screen sizes

Technical Challenges

The biggest challenge was managing the Bluetooth connection lifecycle and translating accelerometer data from the micro:bit into smooth ship movement. I used GSAP's timeline features to coordinate multiple simultaneous animations while maintaining 60fps performance.

What I Learned

This project pushed me into hardware-software integration territory. Working with the Web Bluetooth API and real-time sensor data taught me about asynchronous data streams, event buffering, and the importance of smooth input-to-display pipelines in interactive applications.