Inspiration

We were inspired to create Which Bin? after learning about the amount of Torontonians' recycling that ends up in the landfill due to contamination. We wanted to create an educational game to promote proper waste sorting and reduce the amount of waste that is incorrectly disposed of.

What it does

Which Bin? encourages proper waste sorting in middle and high school students, especially for those living in the Greater Toronto Area. The game greets the user with a main menu, containing information about the game, instructions for how to play, and a button to play the game. Then, players are brought to the game screen.

They are shown consecutive images of different types of waste (recycling, garbage, and compost) and must sort them into the appropriate bins in a given amount of time. If the player fails to sort the waste correctly or their time runs out, the game ends. The player starts off with 15 seconds to sort their waste, but as the game progresses, they are given progressively less time, up to a minimum of 3 seconds, to determine which common items belong to which bin.

How we built it

Which Bin? was built fully in Java, using Visual Studio Code.

Challenges we ran into

The major challenges we ran into were getting used to collaboration with VSCode, avoiding merge conflicts and coding with threads. Our first hurdle was learning about the VSCode software and live sharing while editing our code. We ran into multiple glitches and mistakes due to being new to the VSCode software which caused sections or our code to duplicate or be deleted entirely. We avoided major setbacks by using GitHub and committing, pulling and pushing regularly.

While we used GitHub, we often clashed with each other as we mistakenly worked on the same files, which caused merge conflicts. This happened due to the need to edit multiple class files because of the nature of Java and Object Oriented Programming. We learned to communicate more directly, clearly and more often to avoid merge conflicts.

Another major challenge we encountered was debugging our Java Timer. It was the first time any of us used something with threads. This made understanding the exceptions that were being thrown difficult. We were unable to pinpoint the location of the bug in our program! However, as a group, we were eventually able to do extensive research to fix the bugs.

Accomplishments that we're proud of

We were most proud of our use of a countdown timer and background music in our Which Bin? game. Although the Java Timer and threads were a new topic all of us encountered, having been able to finally implement it the way we wanted to was the proudest moment during SheHacks. Now, you can clearly see the time counting down while playing the game.

Implementing background music in our gameplay was also one of our proudest accomplishments because, like Java Timer, it was the first time any of us had added sound of any kind to a Java project. Although we spent hours trying to implement and debug it, the ambience the music brings to our game made all of our hard work worth it.

What we learned

As a group, we learned about being able to work collaboratively on a large project effectively. Working remotely and using unfamiliar software, such as VSCode, made it apparent that communication and group organization were the key to success. We learned to coordinate which files we would be editing to prevent merge conflicts and to work together to debug code. Although there were many frustrating challenges, mistakes, glitches and circumstances, we learned to collaborate well to accomplish tasks concurrently, effectively and efficiently.

Individually, we each expanded our knowledge of threads, GUI, object and class dependencies. We also learned to use unique Java libraries like Timer and AudioSystem. In general, we were able to deepen our knowledge of the Java programming language.

What's next for Which Bin?

In the future, we'd like to add more trash to sort and more bins, such as household hazardous waste. We'd also like for this to be the first game in a series of mini-games relating to environmentalism and sustainability!

Prize Category Submissions

We are submitting Which Bin? for the categories of: TD Green Hack Challenge, Best Game, and Neutral Best Sustainability Hack at SheHacks V.

Sources

This game features the audio clip Village Dreaming [Loop] by Visager, available under a Creative Commons Attribution License: https://creativecommons.org/licenses/by/4.0/ Music Source and Visager's Music: https://freemusicarchive.org/search/?quicksearch=visager

Global News Article: https://globalnews.ca/news/5099574/toronto-recycling-packaging-landfills/#:~:text=Each%20year%2C%20Toronto%20manages%20approximately,%2C%20and%20non%2Drecyclable%20materials

Built With

  • java
  • visual-studio-code
Share this project:

Updates