Concept:
For this assignment, my goal was to depict a bunch of mini rockets (triangles) blasting off. This idea was mainly because, I wanted to practice using OOP, functions, and arrays in a very simplified manner. If you press down on your mouse, the rockets should shoot up, each at different times!
CODE I’M PROUD OF:
// applies thrust to rockets if the mouse is pressed if (mouseIsPressed) { for (let i = 0; i < rocketArray.length; i++) { rocketArray[i].thrust(20); //increases the thrust value if the mouse is pressed
I know it’s simple, but it seemed like a really cool idea to me.
REFLECTION:
I ran into a multitude of issues while trying to finally complete this assignment. The main issue that I came across, was that I kept creating infinite loops that made P5 keep crashing. It was really frustrating because for a while, I couldn’t figure out what was happening, but in the end, everything was sorted.