Survival Game

During my High School years, I took AP Computer Science Principles class which just turned into an AP class that year. Being a good student I am, I took it to buff up my GPA. The class was basically just teaching concepts like loops, recursion, encapsulation, and other things through “Snap!”. Snap! is basically a GUI developed by UC Berkeley that uses Javascript to give the student a visual experience with coding. It’s basically if every single function and constructor was turned into a Lego block, making it simple and easy to use. For our final project, we were given free reign to design anything and I decided to make a survival game. Battle Royales such as Fortnite were popular at the time so I made a survival game which involved dodging obstacles for as long as possible.

beginning mayhem

The beginning of the game is simple, move your mouse and your player will follow the direction of your mouse. There is a constant enemy which will follow the player and will kill the player if it catches up. As the game progresses however, various different enemies spawn in. These enemies include a “Bouncer” which is basically an enemy which will repeatedly bounce on the wall making it a hazard for the player to look out for. This enemy is marked with the gray color. Every couple seconds, “Lasers” will spawn in which is a blanket of enemies falling from the top of the window which the player will have to dodge. The other two enemies are the “Sine” and “Cosine” which are marked by blue and orange respectively. These two will move left to right with a randomized input sine and cosine equation. Once the player eventually gets touched by the enemy, the game will end.