| assets | ||
| models | ||
| p5 | ||
| .gitignore | ||
| index.html | ||
| README.md | ||
| sketch.js | ||
| utils.js | ||
Asteroids [p5.js]
Features
Used the p5.js library to develop and design a clone of the classic Asteroids game. I added in power-ups which allow the player to slow down time, get better weapons, become invincible, and explode all of the rocks on the screen at once. The particles that explode from the rocks are repelled by the ship, creating interesting patterns when the ship flies through them. The game is arcade style and never ending.
Motivation and Challenges
If you were to look at the previous video game I made, you would notice it was written with functional code, however did not follow the four core principals of Object Oriented Programming. I paid special attention to these four core principals in this game to demonstrate my knowledge of Inheritence, Abstraction, Polymorphism and Encapsulation. Some of the challenges I faced and overcame when developing this game was how to make the alien ship aim and shoot at the player's ship and how to manipulate the angles on the weapon upgrade that makes your lasers fan out. Furthermore, I also used a recursive algorithim to define the starting positions of the asteroids at the start of every level, ensuring that the rocks will not spawn on top of the player, thus giving the player's ship ample time to move around and get situated.
Music
I also composed the background music for the game, which was just an additional fun experience when building the game. You can listen to it (and the rest of the album) here: https://dominicditaranto.bandcamp.com/album/amphibians-and-asteroids