Imagine you are in an arcade, waiting to get your hands on the Space Invaders handle. As you insert the coins, the screen seems different; you see a ridiculous-looking cat wearing a spacesuit moving around the screen. You try to press the shooting trigger, which then makes the Star Wars tie fighter noise, shooting the spinning stars.
As inspired by Space Invaders, my code presents a cat wearing a space suit that can be moved using the arrow keys. When the spacebar is pressed, the cat shoots red bullets, and when a star is shot, it is deleted, and a new one appears in a random location in the space background. Additionally, when the red bullets hit the alien moving across the screen, the alien spins 360 degrees while simultaneously shooting green bullets at the cat. I wanted to make a goofy image/game and have fun with it. I always doodled space cats on school assignments, or whenever I had a pen and paper, so I wanted to incorporate something meaningful into this project. I added more depth by integrating layered rotating stars in the background.
For the process, I knew to use an array list for the stars in the background, but after creating the cat, I wanted to add more dimension to the stars because they were not as defined originally. I then added different shapes of stars by different shapes and a different set of vertices for each one to make it look like they were almost jolting around. I then started creating the cat with a series of ellipses for the eyes, face, body, and limbs. Triangles for the ears, and nose, and an arc for the classic cat smile. It was a struggle to get the ears positioned correctly, as the different variables for each triangle adjusted a different section of the triangle, therefore making the cat’s ears look very alert and upright.
After just having the cat, stars, and bullets, I felt the design needed more detail, so I added a counter in the top left to keep track of how many stars have been shot, and an alien moving across the screen. The alien was even more fun to make than the cat as the sheer ridiculousness of its design cracked me up, and added more personality to the final product.
As I had never coded before, I thought it was helpful to learn how to previously code the different elements to build up an ecosystem so that I was able to combine the skills to create my space cat. I enjoyed having the creative freedom to make something light-hearted and fun for this project.
I wanted to let my mind run wild and present my quirky creative side, which I believe I achieved through this coding project. A lot of the coding process was trial and error, along with rendering different codes of x and y positions until I saw something I was satisfied with.