Better Elevator Pitch (thanks judges for this)

AstroDoodle.party is a 2D web game where players use real life wands tracked by their webcams to draw spell symbols and blast asteroids in a fast pace interstellar race. Combining custom 3D-printed wand hardware, OpenCV tracking and gesture recognition, we brought magical motion controls to life with a cosmic twist.

Inspiration

Our inspiration for this game comes from the 2016 Halloween Google Doodle, Magic Cat Academy! In it you play as a magic cat and fend off ghosts by drawing combos of spells with your mouse.

We thought it would be a cool project if we took this mechanic and made it a real life wand instead of a mouse, so users can cast spells in real life, and also in a celestial space theme.

What it does

Astro Doodle is a 2D Web game where players play as 2 Spaceships locked in an intense space race. However, asteroids and planets stand in their way, and players have to draw the correct symbols with their wands to blast the asteroids away and get points.

The real-life doodling mechanic adds a unique twist, and the game can also be played on any computer with a webcam!

How we built it

We use the laptop's built in webcam and OpenCV to get the position of the colored ping pong balls on each users wand. In order to differentiate between on and off, we designed custom wands with integrated batteries, LEDs and a unique triggering mechanism, all of which we CADed from scratch and 3D printed overnight.

For gesture detection, we used the $Q Super-Quick Recognizer algorithm, which uses 2-D point-cloud distance metrics to match input gestures to pre-coded curves and picks the best match out of our set of spells.

We wrote a custom color calibration function in Typescript and Python to calibrate the camera to different colored balls and lighting environments - users simply have to tap their wand to the camera to join.

The game itself is written in TypeScript on the 2D game framework Phaser 3.0. We prototyped our functionality using WASD as inputs before integrating all 3 components into the final project!

Challenges we ran into

Detecting symbols was challenging until we found the $Q Recognizer algorithm which provided an open-source symbol recognition library which allowed us to accurately detect symbols.

Getting the OpenCV masking to work with 2 balls was also a challenge - we had to duplicate the image and mask out the other ball in order to get it working.

Accomplishments that we're proud of

We invented an intuitive color-mask calibration method for our wand where users can simply tap the camera with their wand, which initiates the calibration process for that specific color. We made it from scratch and it works pretty well!

We're also happy with the look and feel of the custom wands, it unintentionally looks like Playstation 4 Move controllers which are black with a colored ball on top. We designed the wands from scratch in CAD and they went through multiple iterations until we became happy with the user experience. We're proud that we can show off this cool custom hardware as part of our project.

Built With

+ 3 more
Share this project:

Updates