Hi everyone, so today I’m going to be talking a little bit about my programming code for Processing. My challenge this week is to create some code for a paddle using the class feature of Processing. I basically had to create a paddle, make it move on the y axis & create some constraints for my Paddle so it doesn’t go off the page. The code I used can be found below.
http://b.parsons.edu/~malcd702/Dennis/Processing/Paddle.pde
Supporting code is found here:
http://b.parsons.edu/~malcd702/Dennis/Processing/Paddle2_ball_Game.pde
http://b.parsons.edu/~malcd702/Dennis/Processing/Ball.pde
Pseudo code
Things needed
Paddle
Ball & size of ball
Court
Brick Wall
Speed of ball
Levels with speed of ball increases.
Clock timer 1 minute
Collision detection for Paddle
(Create constraint to prevent paddle from moving off screen)
Paddle move Up
Paddle move Down
Ball bounce against edge of court
Ball bounce against wall
Good programming logic
It’s not just a logic. It’s a philosophy… Well done