First of all, I got inspired by the old game (https://kbhgames.com/game/throw-paper), where a player needed to throw a paper into a trash bin. Then, I decided to modify it, thinking about making a waste sorting game. Honestly, when I see trash bins with different labels, I can get confused about how to do waste sorting. Therefore, my idea developed into a sort of educational game. I made some research and stumbled upon plenty of valuable resources from our university about sustainability and effective recycling. https://www.thegazelle.org/issue/148/features/recycling-rundown?fbclid=IwAR29lGNj9u9fJKsSh04SI1rM-9KAqOV92OBGTBX-ObOIKGupfIssHzaCB2A. https://docs.google.com/presentation/d/1pbGNdAsGjuJ5EpqZOm0oOVZWK7rg-g04gpsV4Wo7e0E/edit#slide=id.p.
While thinking about the ways of implementing the game, I came up with the idea of re-creating a Tetris based functioning. Ultimately, I wanted a player to be able to use arrow keys in order to place the trash into the correct bin. First of all, I started with creating bins and trash items as two separate classes. I have included attributes inside each class that help to display and move items due to pressing arrow keys. The items are randomly selected from the trash array and generated at the top of the screen
The foremost challenge was how to implement the logic of the game into coding. As it could be seen in my previous post, I struggled with the basic functionality of the game. I spent a lot of time on this while rewinding everything that we learned in the class and going to the Professor’s office hours. After dealing with that, it became easier to add multiple, but small details for the program’s proper functionality and design. The items are supposed to fall into the correct bin. To achieve this, I have created checkTrash() function, which considers the coordinates of the bin to place trash. After finishing working with the game functionality, I added scores and a timer. Every time a player places trash into a correct bin, the score is increased by 100 points, otherwise, he might lose 100 points. Then, I created the menu for the game with two buttons: Play (to start the game) and Instructions (to get acquainted with the game rules). There is a sound when you click on each button. Also, I added background music as well as a cheering sound whenever a player correctly sorts out the trash.
The beginning of the midterm project was chaotic and challenging, but, eventually, I am satisfied with the final version of it. Through this assignment, I could consolidate the material that we learned during the first half of the semester. Generally, that was a fun experience.