Java Project

Home

What is Java?

Java was developed in 1991, and was introduced to the public in 1995. Java originally went by the name "Oak",
but was later changed to Java, after java coffee. It is one of the most popular coding languages, and runs inside
many pieces of technology today, including computers, laptops, tablets, phones, and many other platforms. It is
mostly incorporated with "Java applets" within web browsers.

What is JavaScript?

JavaScript was developed by Netscape, and is a "lighter version" of Java. Its purpose is to be usable by non-programmers,
and is more user friendly than Java.

Processing Day 1

Processing is a program that uses Java, and is primarily for graphics. We started off with making simple shapes and positioning
them on different parts of the screen.


After going over these basics, we were able to put shapes on the screen as our mouse passed different areas. I was able
to create this by going along the screen in a fairly simple pattern.


After that, we were supposed to make a smiley face. However, I decided to create a replica of a custom profile icon from
"Call of Duty: Black Ops" instead. There are supposed to be swords on his back, but I couldn't get them on properly due to
rotation issues with the shapes. I also didn't include the different eye shapes since I couldn't figure out the eyebrow arches.
Overall, creating the image in Processing made me realize how all these programs connect to the different games I've played.

Processing Day 2

On the second day of using Processing, we went more in depth with loops. We created images like day 1, but instead put them in different,
random positions on the screen. For example, we created a bunch of ladybugs, that were each in a spot and turned to face a random direction.


Here is the code for the lady bugs. The area under "void draw" is what tells the ladybugs to face in random directions.



We also made another function that created bouncing balls that dashed around the screen. This code made each ball a random color,
a random size, a random direction, and even a random speed. It ended up looking like a big mush of colors as they moved around.


Here is the code for the bouncing balls. You can see in the first section how much of the code is telling
the images on the screen to become as random as possible, as opposed to going in a certain pattern.

P5 Coding

On Thursday of the last week, we created a project using P5, which is a type of JavaScript. You can find the finished product under
"It's a secret" on the home page. We were able to create the codes straight onto the HTML, which was very unique from the other
coding languages we used, since we didn't have to use external servers or screenshots in order to show what was made. We imported
the script "P5.js", which allowed us to write our code using JavaScript. One small difference was that we had to use "CreateCanvas"
instead of just saying "size" to make a background for images to show up on. However, it shared a lot of similarities to JavaScript
and Java, such as using brackets, semicolons to end commands, and the commands used for making shapes.
You can view the finished product by clicking the image here.