Inspiration
We drew inspiration from the 2016 Google Doodle game Magic Cat Academy, but wanted to add our own unique twist, a version controlled entirely through your webcam, with no external devices needed.
What it does
Our game tests your quick drawing reflexes! Ghosts appear on screen, each with a symbol underneath their sprite that you must draw to defeat them. Using your webcam as your wand, you cast spells by drawing the right shape in the air. The longer you survive, the more challenging it gets. How long can you last before the ghosts finally catch you?
How we built it
Our project is built almost entirely in Python. We use the OpenCV (Open Computer Vision) library to detect and track the player’s hand movements, while Pygame handles the drawing interface. Once the player draws a symbol, it’s passed into a TensorFlow machine learning model we trained to recognize the shape. The model’s prediction is then used by our enemy classes to determine whether the ghost is defeated, and the screen updates in real time through OpenCV.
Challenges we ran into
The biggest challenge we faced was dataset creation. Initially, we didn’t realize that the Python Imaging Library (PIL) could help us generate training data, so we tried to manually create a dataset using Microsoft Paint, which was, unsurprisingly, not ideal. Once we discovered PIL, we were able to efficiently generate a robust dataset and train our model effectively.
Accomplishments that we're proud of
We’re proud that Air Ghosts requires nothing but a standard webcam, no controllers, no sensors, no extra hardware. It’s accessible, intuitive, and brings a touch of magic to anyone with a computer and camera. Our team takes pride in how inclusive and easy to play the experience is.
What we learned
Throughout this project, we gained hands-on experience training a TensorFlow model from scratch, learned how to use OpenCV to track human movement, and explored how Pygame can capture real-time screen input. It was a crash course in integrating computer vision, machine learning, and game design into one cohesive project.
What's next for Air Ghosts
There’s so much room to grow! We plan to add new levels, enemy types, and symbols, as well as improve the overall art and animation quality. Eventually, we’d love to expand Air Ghosts into a full campaign with a progression system and story-driven gameplay.
Log in or sign up for Devpost to join the conversation.