This week for ICM we were paired in twos, to independently create an object, then send the object to our paired classmate. We would then each create a sketch with the two objects.

I was paired with Joe Mango, who created an orb object. The code is here. I have just started to play around with Dan Shiffman’s Nature of Code examples, so I sent over one of my modified oscillator object. Code here. Putting the two together, they produced a pretty but anxious looking moving image.

Runaway Emojicon: Taking small steps

This week I restructured some of the code in draw() to make the program more readable and added initializeGame() to allow the game to start over if the player loses.

With the restructuring, my attempt was to make draw() the table of content to the rest of the program and only include logic that starts, restarts, and stops the game. However, I think the overall structure is still very messy. For instance, do I need to have a function to draw the background and a function to move it? Also, should initializeGame() and play() be in the same function? I think being able to figure out some of these structural issues and feeling more comfortable and confident building these structures would bring my programming skills to the next level.

initializeGame() is not working very well right now, because play() is still running. So the obstacle objects end up repeating when the player loses and click to restart the game. Again, I think this is a structure issue.

For the next step, I would like to do a better job restructuring the whole program and add new levels.