Inspiration

As a programmer, we need to ask ourselves ways to make games more innovative and interactive for our users. My inspiration was to make a game that does not follow the traditional arrow keys for movement, that dominates the retro 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

Icy Caverns is a cool single player game that utilizes computer vision to allow characters to follow your hand! You have to last as long as you can without being hit by a icicle while the amount of icicles increase by 2 ever 5 seconds! A timer in the top right corner keeps track of your time in seconds to produce a score. This game is accessible through a website, which is created using Flask.

How we built it

Icy Caverns was built using Flask, OpenCV, and Sendgrid. OpenCV was used for computer vision to detect a user's hand and move the miner correspondingly. This game was accessible through a web application using Flask to allow users to play this game without downloading any applications. The UI was built using HTML/CSS. To implement the falling icicles, they had to be generated at random ranges in the x and y values. I had to keep track of the miner's coordinates to check if he was hit, and allow for icicles to disappear on the ground after a certain amount of seconds. Sendgrid allowed for users to email their highest score to their friends, to challenge them to beat it.

Challenges we ran into

The first challenge that I ran into was learning OpenCV. This was my first time using OpenCV and it was pretty difficult, as there were many different modules in which I did not know the functionality of. It was difficult to overlay my camera with the background setting of the game and detect my hand.

The second challenge was the complexity of generating new icicles. It is difficult keeping track of all of the new icicles being created and checking any single one hit the miner. For example, at only 30 seconds, there are already 17 icicles that the application has to keep track of.

The third challenge was learning Sendgrid and implementing my game into a website. It was difficult to set up an account to send emails. I needed to create single senders and api keys and connect them with my application. Furthermore, once creating an application using OpenCV, it was very difficult to convert it into a website. I needed to use various classes to refresh the frames on the website.

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 a couple of days.

What we learned

I learned that organization during a hackathon is key. With so little time to create a functioning application, it is important to know which features are the most important. 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 programmer, as I improved my skills in debugging, when using new technologies such as OpenCV and Sendgrid.

What's next for Icy Caverns

I really enjoyed my game and spent quite a long time playing it! I managed to get a final score of 107 seconds. Feel free to try and beat it! However, first, I will need to deploy this web application on the internet using Heroku. I would also love to implement web sockets to allow 2 players to play together in a single match!

Share this project:

Updates