Inspiration

Bat Escape is a more innovative and interactive game for our users that utilizes machine learning and computer vision. My inspiration was to make a game that does not follow the traditional arrow keys for movement, that dominates the game market today. Computer vision was used to allow gamers to be more interactive and use their hands to manipulate characters with only a camera.

What it does

Bat Escape is a single player game about a bat that follows your hand in real life using computer vision! You have to last as long as you can without being hit by ghosts attacking you. The amount of ghosts increase by 1 every 5 seconds! A timer in the top right corner keeps track of your time in seconds. This game is accessible through a website, which is created using Flask.

How we built it

The web app was built using Flask, OpenCV, and Sendgrid. OpenCV, CVZone, and Numpy was used for computer vision to detect a user's hand and move the bat correspondingly. This game was accessible through a web application using Flask to allow users to play this game online. The frontend was built using HTML/CSS. To implement the falling ghosts, they had to be generated at random ranges in the x and y values. Sendgrid was also used to allow for users to share this game with their friends.

Challenges we ran into

A challenge I ran into was the complexity of generating new ghosts. It is difficult keeping track of all of the new ghosts being created and checking any single one hit the miner. For example, at only 30 seconds, there are already 15 ghosts that the application has to keep track of. I also had difficulties learning how to use the Sengrid Twilio API and implementing the OpenCV application into a web app using Flask. Fortunately, I was able to overcome these challenges. These problems were very frustrating and time-costly, but it was essential in learning and making my game better.

Accomplishments that we're proud of

I am very proud of the end result. Even though it did not match my initial idea of this project, it maintained the core ideas and added extra features as well. I am surprised of how much I learned about computer vision and UI design. With so little time to create this game, I can't help but to appreciate how much I implemented in only 2 days

What we learned

I learned that organization and thinking first before coding a game is key. I took a great amount of time organizing and drawing out sketches of what my game would look like. This was very important as when it came to coding, I knew exactly which features I needed to implement and how to do it. I also learned to become a better debugger, when using new technologies such as OpenCV and Sendgrid.

What's next for Bat Escape

I really enjoyed my game and spent quite a long time playing it! I would love to deploy this on Heroku on Netlify. I would also love to implement web sockets to allow 2 players to play together in a single match!

Built With

Share this project:

Updates