Midterm Part 2

My final midterm project looks a lot different from part 1 of my midterm project. It is also very different from what I wanted a that time. After looking at different types of unique clocks, I decided I would try something a little different. I still had the same basic idea of “Time and Space”, but I wanted to change the design of the clock. I didn’t put traditional “hands” on the clock, but I had 3 rotating arcs instead. This brings something more unique to the piece.

With the stars, I decided to have them be more like shooting stars instead of traditional stars floating through space. I didn’t want the “stardust” to get onto the clock at all, so I made the stars remove the trails of color once they pass over the clock.

The shooting stars make the background more interesting, and once you click the mouse, it changes the color theme. If you press any key then it erases the trails of color. If you hod down a key, then it does this cool “time glitch” effect.

Overall I think my project turned out well, even though it differs a lot form what my original vision was. To make it better I could’ve made the objects interact more with each other, and the user.

midterm-part2

For this midterm project,

 

I planned to make small game . You have three lives continuing game, when you could not hit the balloon, then the life deduct -1.  When you hit the balloon with needle, then score goes up. if you get 30 scores then you win.

 

I made objects for balloon, and niddle. (Needle can hit the balloon, and middle moves horizontally.)

Using for loop helped to make lot of balloons. At the beginning, set up the specific balloons and I put those to array list . (I could put object in the array list)

u.update could bring inside of update. before bring, must send mouseX to update int newX which is called parameter.

if I did not draw needle again , then it does stay in same place, so I put method call display .It may keep showing needle again and again.

Same way for balloon for dropping.

inorder to interact needle and balloon, using Checkcollision helped make

squared balloon, and when niddle came inside of it then balloons can disappear.

Using Float and return helps returning info.

If you hit the balloon with niddle , and then scores automatically go up and another balloons will be dropped.

Midterm Part 2

During the process of creating my sketch, the most successful part was discovering a way to produce a complicated object that is interesting even by itself. Also, placing rotate functions in different parts of the code ended up with a result that I didn’t foresee. There were several surprises like this throughout my process and I learned a lot from them. Overall, my original idea of making a spaceship made out of thousands of squares worked out well. I was able to add two more orbits by incorporating a separate class for the circular object, and add a starfield background by using an array. I was faced with few problems with the rotate and scale function when I started to work with more classes, but I somehow figured out ways around them. This project taught me that things work differently in Processing and Openprocessing. For example, in Processing some interactions with the keyPressed function will work only once and mess up other key interactions, while in Openprocessibg everything works as I intended. Also, the mouseWheel function works so well in Processing, but it won’t respond at all in Openprocessing. Those are the two problems that one can find in my final sketch. Finally, I wanted to add an interaction where I can add the orbits by pressing ENTER, but that never made it to my sketch because the object is not a simple eclipse but a group of recurring object that is also rotating.

https://www.openprocessing.org/sketch/515679

Midterm Part II

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