Coding this game was quite a journey. At points in time, I spent 1 to 2 hours dissecting if() statements to fix bugs or things that I didn’t like about the game. The collision was rudimentary and barely worked at the start, and after I did some thinking and testing, I was able to make it work and be enjoyable for the player. I spent a while making different soundtracks for the game before I was halfway done coding because I wanted to hear what the game would sound like to help me develop it. In total, I only ended up using about 3 sounds, but this game really centers in on minimalism, so I’m satisfied with the sounds, because they do just enough rather than too much. The first picture in this post shows a rough outline of how ridiculous coding this game was/how frustrated I was in trying to overcome some obstacles (that I managed to).
I started with the basic seeker code, and messed with it probably around 40 times until I got to where I am now. It was originally a bunch of vehicles that were attracted to or repulsed by the mouse coordinates, depending on if the mouse was pressed or not. I played with color and the speed and movement of the vehicles, but it didn’t seem to be enough.
I got rid of all of the vehicles, except for one, and I changed the collision from the mouse coordinates to the coordinates of the one vehicle (triangle). Then, I added a floating rectangle, and played with various movement options, and outcomes from collision. My initial idea was to have a few rectangles floating around, and once the vehicle collided with one of them, it would follow behind, and this would apply to each rectangle, one behind the other.
Then, I thought about making the rectangles surround the vehicle on each side, and I had serious trouble doing this. Probably about 2 hours of trouble. It finally clicked in my head, and I assigned a boolean to each rectangle collision check, so the outputs i was making would last past the duration of the collision. I finally did some tweaking and made the rectangles shoot away from the vehicle after all of them are collected and the mouse is released. A short time before this, I implemented some basic wrapping, and then fixed it after I made movement changes in the vehicle and rectangles.
Parts of coding this game really stumped me, but through double-checking, testing, and tweaking, I was able to rid it of bugs, and be proud of the game in its final stage.
- I’m still confused about the order in which Processing drew my objects, and why the color and line code from one object’s tab would find its way into the next one. The planets took on the stroke data from both larger circles (the first planet thrown is always player-blue and the rest are enemy-red), and changing the background color ended up only changing the color of the enemy-circle. This was frustrating but not huge.
- The inclusion of sound is as big a mystery to me now as it was when we started.
- No interface elements (Game Over screen, timer; though I do sort of like the way it just sits still when the game’s over)
- Planets stick around after they’re supposed to have moved offscreen or stopped being rendered entirely. I’m not sure why (in retrospect I probably shouldn’t 0have committed to such an array-heavy set of mechanics).