A 2D shooter game where you must fend off aliens on the moon and survive as many waves as you can. Built with the pygame module for Python.
Main Menu:
Screen.Recording.2022-07-12.at.3.40.25.PM.mp4
Round 1 Example:
Screen.Recording.2022-07-12.at.3.41.07.PM.mp4
Higher Round Example + Buying Ammo:
Screen.Recording.2022-07-12.at.3.42.37.PM.mp4
Game Over Screen:
Screen.Recording.2022-07-12.at.3.43.11.PM.mp4
- Clone this repository to your machine
- Ensure that you have Python 3.9 or later installed
- Install Pygame if you haven't already by following this guide
- Run main.py in order to start the game
This is a side project I made after completing my first semester of computer science. I wanted to apply the skills I learned in my programming classes such as object oriented programming and also learn more about the pygame module which we used only briefly for an assignment. I also wanted to polish up my coding skills by writing clean and readable code.
The main reason why I chose to use pygame to develop this game was because I was already familiar with python through the first year programming classes I've taken, and I developed an interest in learning more about this module when it was used in one of our assignments to display a UI, but this code was already provided to us. I wanted to learn more about how pygame worked and what else I could create with it, and a game seemed like an interesting first project to use it.
I knew that for my first project I wanted to create a game as I enjoy playing video games and am also interested in how they are developed. I wanted this game to be like call of duty zombies where the goal is to survive as long as you can through waves of enemies which progressively increase in number the more waves you survive.
This project involved learning about the pygame module which I had very minimal experience with prior. I learned how to read and utilise the documentation for the module in order to implement the features I wanted. I also found many resources online such as YouTube tutorials which teach you how to get a simple game running on pygame, and I went on from there to implement more advanced features I wanted in my own game. This project was a really good learning experience as I applied object oriented programming without the help of a guide like you would get on an assignment, and so I learned how to decide what parts of the game would become their own objects and what methods and subclasses I would need in order to implement the features I wanted.
This project also allowed me to learn how to use mainstream programming software such as Visual Studio Code and GitHub. I made the decision early on to use these applications when developing my game instead of the software I was used to using for university assignments as I knew that they are used a lot more in the industry so being well versed in how to use them would be very beneficial.
An obstacle when developing this game was the unexpected complexity in implementing seemingly simple features such as character and enemy animations, as well as a simple UI such as a main menu and game over screen. Online tutorials did provide some help in implementing these features, but it also involved a lot of experimenting with the code in order to figure out how to add such features to my game.
Another obstacle was maintaining clean and readable code. I would find myself working on implementing a feature and creating many variables, loops, and if else statements and have to take a step back and look at how it was cluttering up my code. I had to spend time deciding how best to write out the code so that it remained readable. This involved creating objects and methods for something I was originally writing in the main function, and simplifying if else conditions by combining them with others I already wrote or eliminating the need for them.
Game icon credit: http://clipart-library.com/clipart/pcoAg49Ri.htm
Main game music: Ludum Dare 38 - Track 10 By Abstraction