Inspiration
After making Tetris in lab6, we wanted to take it a step further. Our goal was to revamp the game by creating an entirely different user experience with a unique set of controls. By adding cool features like motion detection and face recognition, we wanted to put a spin on everyone's favorite old time game.
What it does
Our new version of Tetris allows the user to control the piece using face and hand motion detection. The user's computer camera captures the location of the user's hand and face to recognize if there is a legal person playing the game. The motions link with the Tetris movements to create an interactive game experience!
How we built it
We used OpenCV and Pygame to make our version of OpenTetris. We borrowed existing libraries of feature detections (cascades) that we used to recognize the face and hand shapes. From there, our code integrated Pygame and openCV so that the both the user's image and the game could be displayed at the same time.
Challenges we ran into
The major challenge was to integrate Pygame and openCV so that they were able to run simultaneously. In addition, finding suitable gestures to rotate the pieces and figuring out how to translate data from OpenCV to movement in the Tetris game proved difficult initially.
Accomplishments that we're proud of
Learning how to track hand motions and movements
Getting the piece to move as accurately as the hand does and being able to rotate piece without making the code overly complex
Learning how to use openCV and Pygame for the first time in a short amount of time
It works!
What we learned
We learned new modules that we can use in our term projects
How to make a large project in a short amount of time
Collaborating with people we met for the first time
What's next for OpenTetris
Improving the accuracy of our motion detection algorithms
Improved graphic design and user interface
Adding levels and additional features
Log in or sign up for Devpost to join the conversation.