✕ Close
Close

Contact

Feel free to reach out about research, projects, or anything you found intriguing.

Click to copy Copied.

Open in mail

LinkedIn ↗ · CV

Skip to content
The browser game in play: an amber ship on a starfield with two asteroids and a dust cloud falling toward it
Face Tracking Space Invaders /projects/face-tracking-invaders

Play Face Tracking Space Invaders

A browser port of the game that won first place at Hackstoga 2023. Stand in front of your webcam and dodge with your body, or steer the ship with a pointer or the keyboard.

How the port works

The Python original captures an empty background, subtracts it from every frame, and uses the difference as a live collision mask. This page runs the same subtraction on a 160 by 90 copy of the camera frame in plain TypeScript and uses it to find you, while only the ship takes hits. A MediaPipe face landmark model, served by this site and run in your browser, places the ship on your face and reads your smile. If the model cannot load, the ship rides the top of your silhouette.

Rules:

  • 10 lives, one point for every obstacle that reaches the floor.
  • Dust clouds drift sideways at random as they fall.
  • Every obstacle falls at its own speed. Speeds rise through a level and again on the next one.
  • With the camera on, leaving the frame ends the run.
  • With the camera on, smiling when you are hit gives a 30% chance to keep the life.

Build real things. Make them worth using.

About Contact GitHub ↗ Scholar ↗ CV