-
-
Save The Slugs: An interactive game where you can help Sammy the Slug Save his friends from the litter in their forest home!
-
Start Screen: Click Start to play, How to Play to read the instructions, or Purpose to learn more about the game.
-
How to Play and Purpose pop up screens
-
Hurry, hurry! Clean up the Redwood forest before time runs out
-
OH NO! You were not able to save the slugs home :(
-
YAY! You saved all the slugs from the pollution in their homes! Thank you for your help :)
ABOUT Save the Slugs!
Inspiration
UCSC is one of the most beautiful campuses around the country. Located in the Redwood forest, UCSC is an ideal place to learn about the conservation of our environment and how you can take part in reducing global warming. Unfortunately, living in the Redwood forest also means you see how wildlife is affected by human-made pollution.
Save the Slugs! aims to educate the player on the effects that global warming and carbon footprints have on the environment. We hope that after joining Sammy the Slug on his mission to help his banana slug friends, the user will be encouraged to take a stand against global warming in their daily lives.
What it does
When launching the game, a window with the Start Screen will appear. The user has the choice to click on How to Play to learn how to guide Sammy on his mission or by clicking on Purpose they can learn about the goals and inspiration for the gave. When ready, the user can click Start to begin the game. This will take them to the forest map where they will use the arrow keys to move Sammy around the screen. The goal of the game is to collect the trash the is littered around the map. Use Sammy to hover over the trash. Be sure to clean the forest before the time runs out!
Team Experiences
Challenges we ran into:
One of the biggest challenges that we ran into was debugging and make sure that small components work. In terms of the internal clock that kept the game running, we had a hard time trying to figure out how to make it reset, whenever the player was to go back to the home screen. This was due to the fact that our algorithm for the clock was a while loop that had flags to check if it was a certain time interval (each time interval would allow specific stages of the game to progress). In fixing this problem, we turned to the idea of having a 'reset clock' block of code at the start of the game.
Accomplishments we're proud of:
The application of the idea and such the completion of our game working is definitely something that we are proud of. In the beginning, we were ambitious in making the game multi-stages with different levels of trash and different characters.
Despite going in with a big mindset, we are proud that we were able to narrow down the goals of the project and what we wanted to work within it: thus allowing us time to make sure the application was fully functional by the deadline. Another proud accomplishment was the team effort that we all put it: despite different levels of fluency of Python in our group members we were able to work together in order to get everything from small sub-routines to the main function, working well!
What we learned:
We learned the importance of community and communication, especially during the events of hackathons. Talking with your team and making sure, whether a function has been completed or if there is a bug and one has no idea how to approach the problem, is crucial to the growth and development of the team. No matter how "bad" or good the news was, it was fundamental that each one of us voices our problems and success in order to keep the team in check and drive the application to the finish line.
How we built it
To build Save the Slugs! the team worked with Python and Pygame libraries. The program is run executed through the Main.py file. This contains the while loop that allows the game to keep running.
while True:
for event in pygame.event.get(): #allow the display to close
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
Start_Screen.buttonInteractions(screen) #changes button colors on start screen
#Start_Screen.buttonText(screen) #adds text to start screen
pygame.display.update()
`
The main file imports from the Start_Screen file which contains the code that initializes the start screen. If the user clicks on How to Play or Purpose the screen fade into a yellow pop-up window with the corresponding information. Clicking on the Start button will direct the player to the forest scene where Sammy is ready to save his slug friends.
The interaction between Sammy and the trash is calculated using a Collision function that takes in (x,y) coordinates for Sammy and the trash as arguments.
def isCollision(playerX, playerY, trashX, trashY, flag, totalTrash):
distance = math.sqrt(math.pow(playerX - trashX, 2) + (math.pow(playerY - trashY, 2)))
if (distance < 51) and (flag == 1):
pygame.mixer.Sound.play(Powerup)
return True
else:
return False
If the timer runs out the user will be taken to the loserScreen; however, if they were successful in their mission the winnerScreen will be shown instead. Within both of these screens, the user has the option to return to the Start Screen to play again or they can press on the EXIT button to quit the game.



Log in or sign up for Devpost to join the conversation.