JOSH BROOKS

WELCOME TO MY ONLINE PORTFOLIO
BACK TO THE TOP
- Here is another small project as part of my first semester of this course, here we looked at using a program called Processing. Processing is a problem built using a Java syntax that allows the user to create, 2D or 3D designs using different shapes and animations by using Java coding. I enjoyed this project a lot as I like the coding elements of this project, however i found it was quite difficult to exactly create what i wanted as i found it difficult to learn the coding syntax in comparison to the prior knowledge of the coding that i have using Visual Studio. Aside from that I am quite happy with the result and my simple game came out good.

- After creating a few tutorial Processing applications, I learnt the basic's of Processing coding and started on my portfolio piece, due to my inner gaming nature, from the start I wanted to create a simple platform game, where the user controls a ball and jumps an obstacle course to get to the finish line. At the start I wanted to make it side scroll, however I thought this was too complex and simplified it to make it easier. The first code screen shows my variables and my Void Setup. Void Setup and Void Draw is the two default things you need for a Processing application. Void Setup controls on load, Void Draw controls frames, 12 frames a second (can be changed).
pde
pde
- The second code screen above here shows my drawings to the screen. All of the 'rect's are rectangles, the obstacles that the player needs to jump on and over. The 'ellipse' is the controlled player and the 'triangle' is the finishing flag. The four values identifies the properties of the drawing, the first value is the X position, second is the Y position, third is the width and the fourth is the height. As for the 'fill' property, the values identify it's hex value. All of these shapes will draw to the screen 12 times a second.

- The third code box (far left), shows my coding for the arrow key controls on the keyboard, the code calls for functions to be used at the bottom of the document, in which changes the value of a variable to move the ball. If the Up Arrow is pressed, the ball jumps, the Left Arrow makes it go left and the Right Arrow makes it go right. This also shows the boundaries for the outside of the screen so the ball always stays on the screen.

- The fourth code box shows the boundaries for all of the rectangles, the platforms and obstacles that the ball needs to jump on and over to get past. This code ensures the ball cannot just pass through them, makes them solid.
- The fifth code box (to the right) shows the Void keyPressed setup. This isn't needed in every Processing application, however it does need to be included for when you want to use keyboard keys in your application. Here this code controls the keys once there pressed, earlier I stated that the code called a variable which calls a function, this acts as the function in which it changes the Boolean variable from False to True, therefore activating the movement of the player. Therefore this code along with code for Void keyReleased controls the value of the variables to activate the movement once pressed and stop once released.

- Below is my final sketch of my application, overall I am very happy with the final outcome. From the start of this project I wanted to create a simplistic platform based game. Originally I wanted it to be a side scrolling game with small enemies that would kill you on collision, however I found this way too complex for me to do and therefore toned it back to just a simple one screen game in which you control a ball, moving and jumping over obstacles. Processing as software was very good to use, the pre built in code that runs all of the draw mechanics make it really simple to learn the basic's of the coding syntax and make a simple application. I picked up the syntax very quickly from the prior knowledge I had of Microsoft Visual Studio, it is very similar. This program is very good for both beginners that want to learn and begin to make applications as well as experts who want to use this program for experimenting and creating complex applications and game mechanics. Especially with the option of creating a 3D visual canvas of your sketch. Making it much more versatile than other coding programs. To improve my application, I would make it more complex by adding in more levels, difficulties, enemies and the ability to side scroll.

- Why not have a go? Click on the Application to start. Controls are below.
- Controls: Left Arrow = Move Left // Right Arrow = Move Right // Up Arrow = Jump.

- If you cannot play and view the application, please feel free to open/download the .exe file here, this should allow you to play outside of the browser:
exe