Processing Game (Homework due Nov. 6th, 2017)

Sorry about the late post, but it totally slipped my mind after how hectic Open Studios was!

For my game, I decided to pay homage to a basic space invaders game that I used to play when I was younger. Instead of the joystick and button, though, I implemented a potentiometer and button. Basically, the goal of my game was to defend the Earth from the randomly spawned asteroids by moving the spaceship with potentiometer and firing its laser using the button. 

This game really gave me the opportunity to experiment with object oriented programming which was great because it’s something I’ve always wanted to dabble more in. I learned to used ArrayLists to store the Asteroid and Laser classes so I could have a dynamic number of them on the screen. My main difficulty was mapping the collision, because I had initially used a PShape group object to draw the asteroids. However, I couldn’t figure out the exact width of the shape, so I changed the asteroids to a regular rectangle. But after I got the collisions working, it was mostly smooth sailing. Aside from when I tried to add sound, but the sketch started using too much memory, so I decided to refrain.

This game was also a challenge for me because I decided the only online help I would look at would be the processing references and tutorials. In the end, I kept to my challenge and it was pretty rewarding when my game worked.

Processing Code:

Arduino Code:

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *