For my final sketch, I added a shooting star using an array and a fruit class. I also added rotation to my stars; so that when the user clicks on the screen, a rotating star is created. I added a fruit class; the color of the fruit corresponds with the color of the tree’s leaves. Last week I had a full moon and this week I added phases to the moon. When the user presses a key, the moon’ phase changes. Rather than have a random colored house each time, I just chose to have the house’s door color change randomly.
When I started to create the shooting star, I thought I was going to have to scrap the idea because after making the shooting star, everything else did not work. I have to put the shooting star in the draw class and that means I have to put the background in the draw function so that there is no trail. If I put the background in the draw function, I have to put the rest of my objects in the draw function so that they don’t get overdrawn, but because a lot of my objects change color, it looked really bad. I ended up adding the shooting star by having a black rectangle being drawn to cover up the star’s trail.I also wanted the stars to rotate; I applied the same black rectangle to the stars so that there would be no trace of past rotations. I limited the star’s location because I only wanted stars to be drawn in the sky (and not on the house and moon) and this made coding the interaction between the stars and the shooting star easier.
I added a lot to my new sketch; I refined the colors, added a changing moon, a shooting star, rotation to the stars, and fruit to the trees. If I had more time, I would have made the shooting star look more like a star with a small line following it. I would have also made the tree using recursion so that it looked more realistic with branches.
Link to Sketch:
https://www.openprocessing.org/sketch/516141