Experimental Interaction | Processing : Pong Assignment

Having started on open source, we looked further into the various open source projects. Processing is an open source computer programming language built for the design communities with the purpose of teaching non-programmers the fundamentals of computing programming in a visual context.

Using processing, we are tasked to work on our first individual project – Pong.  After much struggle, I finally managed to program a complete and functioning game!  This is how the game looks when you run the code.

Pong, is essentially a table tennis game where there are two paddles on the two ends with a ball in the middle as seen in the above.

To code the two paddles at the two ends, you will have to include ‘void drawPaddle ( ) {‘ and type ‘rect(a,b,c,d);‘ where a rectangle representing the paddle will be drawn.

a: x-coordinate of the rectangle | b: y-coordinate of the rectangle | c: width of the rectangle | d: height of the rectangle

To code the ball in the middle, you will have to include ‘void drawCircle ( ) {‘ and type ‘ellipse (a,b,c,d);‘  where a circle will be representing the ball will be drawn.

a: x-coordinate of the ellipse | b: y-coordinate of the ellipse | c: width of the ellipse | d: height of the ellipse

With that, the game is pretty much completed with the main elements done. To further improve the game, a ‘game over‘ sign will appear when either side of the paddle wins.

With that, the game is pretty much completed & ready to be played!

 

 

 

 

 

 

Leave a Reply