Inspiration

I wanted to create a game to encourage people to care about the environment and participate in beach cleanups.

What it does

I developed a game where a player can move around the beach to pick up pieces of trash, such as water bottles, soda cans, and cigarettes. But, the player must avoid obstacles, such as crabs, seagulls, and seaweed. If the player runs into an obstacle, it's game over. The player can also collect seashells, which are worth extra points.

How I built it

I built the game in Python using PyGame.

Challenges I ran into

Since the images for the trash, obstacles, and seashells aren't exactly rectangular, the default collision function from PyGame wasn't working well for detecting collisions between objects in the game. So I created my own object detection algorithm that takes into account that the boundaries of the object aren't exactly the corners of the image but rather somewhere inside the image.

Accomplishments that I'm proud of

I am proud of myself for creating a cool game that promotes taking care of the environment.

What I learned

I learned how to use PyGame to create games. I also learned how to add sound effects when the player collects objects.

What's next for Beach Cleanup

It would be cool to add levels to the game where the speed increases over time or the obstacles chase you.

Built With

Share this project:

Updates