About the Game
This was built on from a school project in 2021 where we were prompted to make a "simple" game with ONLY the knowledge learned from ICS3U course in 1 month. Being a programmer with years of experience, I made the game to be significantly more complex than what was required. The teacher was very impressed despite the fact it was not polished as well due to a lack of time.
Pygame - Advanced Fighter Game
Why Did I Choose This Game?
With the knowledge learned in the course, games such as floor is lava, maze and flappy bird are too simple by design and does not stand out from the rest of the class. I need to create a game the exceeds all expectations. Combining that with my personal interest in shooting games, I came up with the 2D fighter game inspired by Nintendo games in the 20th century.
My Personal Requirements of the Game
- The character must be able to freely move around the screen and control the engine's thrust
- The fighter jet must be able to shoot at wherever the player aims (can shoot at an angle and not just straight forward)
- Different types of enemies
- Enemies must react intelligently to the player's presence and fire back
- Upgrades and currency
Technical Implementation
The basics of the game such as movable characters, currency and upgrades were completed within a few days. However, the shooting function is where I got stuck for almost 2 weeks. Because I am not allowed to use classes and objects, I cannot create a "bullet class" (blueprint for creating more bullets). Therefore, I had to rely on duplicating the bullet function and control the fire rate to ensure a maximum of 5 tracers (bullets with color) appear in the screen simutaneously. To make matters worse, each bullet have many variables, including where the player aimed, how fast it is travelling, etc. This process makes each bullet a logistical nightmare and relies on trial and error to get the final function working. Especially as the player aims diagonally, a complicated algorithm is needed to calculate the horizontal and vertical deviation of the tracer every frame. This process took weeks to complete. However, the end result is extremely sastifying, the player is able to shoot anywhere on the screen instead of being limited to fire horizontally like most other shooters. Some enemies, using a similar version of the same shooting function to track down player's location and fire accordingly.
Now that the essential components of the game was completed, I polished it by adding sound, background and objectives (the green beacon in the end). I also added a missle tracking system for one of the enemy turrets. To make the game more realistic and playable, I programmed the missle to track the engine exhaust of the jet and will self destruct if it does not hit the target in 5 seconds. The process was tricky and time consuming, but I prevailed in the end with a few days of de-bugging. When the assignment was due, I did not have time to add the menu page or instructions on how to play the game. This became the most important reason separating my game from perfection.
Future Steps
Looking ahead, I plan to use my knowledge on Objected Oriented Programming (OOP) to improve the effectiveness of the game and create classes to act as blueprint for objects such as bullets and enemies. This way, I am able to adjust the fire rate more freely and have multiple units of the same type of enemies appear on the screen simutaneously. Additionally, more polishing need to be done, including a menu page and instructions on how to play the game. I also plan to look into customizable control keys where the player gets to decide on what button does what function.