For this week’s assignment, I decided to go back to the screen drawing I created last time and added movements to existing elements. I began with the background by randomizing the color and turned it into a neon color sequence.
It took me a little longer to figure out how to move the fish as a whole. I added x and y to each parameter but I wonder if there is a simpler way to do it. Perhaps a set up similar to the group function in Photoshop?
The hardest part for me was moving the bubbles. I initially wanted to make a variety of bubbles (not randomly generated size) move upwards at a constant speed. After many attempts on adding speed at various places, it just wouldn’t work and hence I had to make adjustments to it. Bubbles will appear out of the fish’s mouth whenever the mouse is pressed.
I also couldn’t find my way to repeat the grass pattern instead of using hard coding. The video showed ellipse as an example which has only the x variable while a triangle has three variables that needed to be declared. I don’t know how to fit the three variables into the for syntax and hence I had to leave them with the original code as for now.