Inspiration

We wanted to build a fun mini-game to promote the importance of recycling. We got inspired by the hungry snake game and decided to combine the two topics. Also, plastic bottles are really harmful to the environment. It takes about 450 years for a single water bottle to decompose. Therefore, we decided to collect plastic bottles in our game.

What it does

You play as a recycling train and with each plastic bottle you collect, you grow in length. If you have collected more than 5 plastic bottles, you can drop off your collection at a recycling station and increase your score. If the train head hits its own cart or the walls, the game will be over.

How we built it

We use Java Swing to build our mini-game.

Challenges we ran into

The collision detection between the train and the plastic bottles was a little challenging, but we ended up figuring it out by drawing everything on the fourth quadrant of the cartesian plane.

Accomplishments that we are proud of

We designed all of the icons from scratch using Pixilart. In addition, we fixed a bug where the train icon was not reset properly. We are also proud of the collision detection and the score keeping system!

What we learned

By doing some research on the internet on recycling, we learned that different cities have different recycling systems. We also learned how to create a game using Java Swing. :)

What's next for Recycling Train

When we first started, not knowing different cities had different recycling systems, we originally wanted to incorporate multiple colored collector bins (green, blue, yellow, brown...) so that the train can collect different types of recycling and put them into the correct collector bins. However, we weren't sure which city's recycling system to use and we didn't have enough time to implement location tracking, so we just stuck with a single collector bin.

However in the future, if we have more time, we would love to implement a method to detect the user's location and show them a game that uses the correct colored collector bins that reflect their city's recycling system.

Built With

Share this project:

Updates