Inspiration

At school, in our beloved, recently renovated cafeteria (the PFM) there are 4 different trash cans, trash, compost, recycling, and mixed recycling. Many times, we along with others will throw everything into any of the trash cans due to our lack of knowledge on what is compostable vs recyclable vs trash. This led us to research and reevaluate how our small choice of how to dispose of our waste is impacting our environment and Earth. After a better understanding of recycling and composting, we decided we wanted to create an interactive method to learn the basic disposal of common items in our everyday lives while making it accessible and equitable. This game will hopefully improve incorrect disposal of items here on NCSSM’s campus and in other communities across the state, nation, and even the world.

What it does

Recycling Rampage is a game where the user is prompted to sort a common household item into one of four bins: trash, recycling, compost, and others. They drag and drop the assigned item into their desired bin and can see if they are correct or not. The game tracks the user's score, which will motivate them to replay and learn even more. After each sort, the game will display an explanation to ensure the user understands why an item belongs where it does, and hopefully, the user will be able to apply this knowledge the next time they visit a waste sorting area.

How we built it

Recycling Rampage was built using pygame through the Python coding language on VS Code. We drew all of our own artwork for the game using Procreate and OneNote. In the program, first, we initialized all items, loaded in images, and used the Sprite class to make the different sorting bins into a group. We had three main functions: a start/title screen, general gameplay, and an end/replay screen. On the start and end screens, the program displays directions on how to proceed: either starting the game, or choosing whether to end or replay. The gameplay function runs after the start screen and is controlled by a while loop. Each time the loop iterates, it updates the game screen after items move or the score changes or etc. Five items are randomly chosen from a larger group of items for the current round, which keeps the game short and sweet. Each loop iteration is always checking if keys are clicked, the mouse is pressed, or if the game is exited. After each item is sorted into a bin, the game will display if the user was correct, update the score if applicable, and display an explanation for the correct sorting location. Once the five items have been sorted, the end screen will display the user's final score, along with more recycling tips. If the user chooses to replay, they will be able to sort another group of items and hopefully learn something new.

Challenges we ran into

We had our fair share of challenges during the Hackathon this weekend. Starting off, the website we initially used to host our game wouldn't allow us to connect to any wifi, leading to a slow and glitchy game. This was resolved once we switched to using VS Code on the PC. Secondly, pygame has specific rules concerning sprite collision with non-sprites. The item getting dragged by the mouse to be sorted is not a sprite, so checking for collision was a challenge. We discovered that we would need to use the mouse position after an event occurred to indirectly check for collision. Lastly, when drawing our visuals for the game, working to get transparent backgrounds for each proved to be difficult, but once we developed a system, it ran smoothly.

Accomplishments that we're proud of

We are proud of ourselves for working as a team to complete this project and working together, especially with one of our members being online and two being Durham students. We are proud that we were able to hand draw all of our items for our game, including the logos, and incorporate them into the game. Code wise, we have only briefly worked with pygame before, so relearning pygame syntax/methods and writing the whole program in such a short amount was a new and fulfilling achievement. The fact that this game could benefit so many people in marginalized communities, as well as help to sustain a long-lasting and healthy earth, is the most valuable accomplishment.

What we learned

Through this year's Hackathon, we learned a lot of different ways that AI and computer science can be used to both model growth and improve sustainability through both the workshops and our own project. When working on a project so fast paced, we learned methods to organize our thoughts about the overall functionality and organization of the program code. Also, we learned new methods and relationships between classes and sprite objects. Lastly, we learned a lot about being ambitious and being able to also complete this project within the allotted 36 hours, along with the workshops and guest speakers.

What's next for Recycling Rampage

We have many ideas of how to improve future versions of Recycling Rampage. Firstly, implementing the game in the form of an app or a website is important to increase user accessibility, as well as improve image quality in a bigger window. Then, increasing the number of items available to sort would greaten the possible learning events for users. Also, displaying a user's statistics (showing the number of games played, progress bar, or high score) could make the game more engaging for a longer period of time. Lastly, just another fun addition could be sound effects when an item is dumped into a bin. Hopefully, these future changes will make the game more compelling and informative to future generations, thus ensuring a healthier Earth.

Built With

Share this project:

Updates