My Advanced Programming

Today we started learning new computer languages, we started with java. Using the new type of code we created new shapes by making the new code, and running the program. We started making simple shapes, and moved on to making a smiley face. I went one step further and made my smiley face have a stick figure body.

here is my code, with each part of the body labled. And here is the body tat resulted from my code.

Also today we started making a ball, using a simple elipse, like we did before with the smiley face. The ball itself moved around the screen, at a and then re appeared on the opposite side it dissapeared from.

We then went farther and instead of it simply going in lines, we had it bounce off the walls it hit, we accomplished this by using variables, loops, and conditions. The way I set it up is that it also changes its color based on the X and Y axis. By setting the blue and green to match the x and y axis, the color constantly changes, but becaause my resolution was very large, and for colors the max is 225, I had to have it divide the numbers so it would be small enough to be registered by the computer.


Today was only the start of the C languages, there are many more that we will cover, but so far I am really liking this new java compared to python, it seems easier at the moment, but I have no doubt there are many difficult things inside of this new code.
Today we focused on not esentially using the language, but studying it. We used the website CodeAcademy, to get a more indepth look at the Java language, how it works, and what it can do. The first part is an introduction to the language, and then we were able to start our own adventure. Making a little game of our design using the knowledge we gained from the privious lessons before. Here is a part of my game.

A very simple game, but it did take a while to get it all just right so it would work perfectly.
As we progressed through the classes, we would earn medals. When you earn them they are sent to your profile and are saved there. Here are mine, I currently only have four.

Today, wednesday, we made a function to draw up a house.


This funtion was simple enough, drawing the shapes and coloring them to form a 2D house. But as we went on we made it more complicated. substituting the numbers with x,y, and length set before. So now we could resize the house and each part would scale correctly. And by changing the normal X and Y starting point, to mouseX and mouseY the house would go where ever we moved the mouse,and resize itself based on where it was. Last but not least. we became realators. B adding some changes to the code, we made it so the house would duplicate itself how ever many times we wanted it to, and be right next to eachother.


Later today we started a convrsation about sin, cos, and tan. And how we could use the in our code. By adding a new line to our code that duplicated houses, it would wllow them to move up and down like a heart moniter.

but my result, was very unexpected.

I am not sure where the error occured, but somehow my measurements were changed from before, and the way it changed position made it seem like a 3D worm like object.

Home