Inspiration

Snakes are on nearly every continent of their world and exaggerated societal fears on each have degraded them into a common source of dread. We tend to ignore them, but instead, we should be celebrating our reptilian brethren for giving a divided world something to unite over. What better way to do so than upgrading the ever-popular snake game?

What it does

This project consisted of a snake game that is stored on a RaspberryPi. It acts as a sever to which two computers can connect with via a local network and play snake against each other. In addition, Open CV was used to track a finger to different quadrants of the screen, allowing one player to control their snake with hand gestures. Although both work separately, they do not seem to like each other. We found an implementation that works, but requires the player using hand gestures to look at the other player's screen to see the game. During testing this was not a big issue

How we built it

First, we made a one player snake game, then slowly added more and more features. We added the second player, then connectivity between two computers. However, the game was incredibly slow over the public WiFi, so we created a private network with a Raspberry Pi to improve this. The hand gesture feature was made using OpenCV and Python. We used some basic networking skills to connect all of the parts together

Challenges we ran into

As we are high schoolers, our knowledge was pretty limited. At first, we wanted to integrate a Microsoft Kinect or Google ML into our project, but a lack of hardware and experience prevented us from doing so. Normally, we work with algorithm focused problems, so adding in hardware and other computer features (vision) was a steep learning curve. In addition, our main languages are Java and C++, but neither were optimal for this project, so we had to spend time learning a whole new language.

Accomplishments that we're proud of

  • Attending our first Hackathon as high schoolers
  • Almost finishing a project
  • Learning several new skills
  • Strengthening fraternal bonds through the crucible of a coding competition
  • Drinking over 2 gallons of sparkling water (Perrier, please sponsor us)

What we learned

We had very brief experiences with Python in the past, but this definitely gave us an opportunity to use it in more depth. However, neither of us had ever used a Raspberry Pi or OpenCV in the past, so it was really rewarding to be able to use both and learn how they all connect together.

What's next for Super Snake

  • Adding some aesthetic features such as a scoreboard and some more appealing graphics. These are neither laborious nor difficult to implement. We just did not have time to get around to it.
  • Figuring out how to reduce the latency, so the snake game runs as smooth as possible.
  • Incorporating AI/ML to make a computer controlled opponent and to improve computer vision (recognition, differentiation, etc...).
  • Voice Commands?
Share this project:

Updates