Project 2 Pong Planning Worksheet
Project 2 Pong Planning Worksheet
We're ready to write our first game! Part of programming is breaking down a problem into smaller pieces that you can solve separately. You then
combine these smaller pieces into larger components until you have the whole program put together.
For the Pong game, use this planning worksheet to help design your code BEFORE you start writing. Read over all the requirements in the left column.
Take a few minutes to think before filling out the rest of the worksheet. The first row is an example.
Game What's going What owns What triggers the What could be Pseudocode
component on? the logic? change? tricky?
Players can control Paddle moves up or Paddle sprite Press up or down arrow When paddle gets to the Left paddle
variable: left speed
paddles with required down Press w or s keys top or bottom it can't move
keys anymore if sprite is hitting top edge of canvas OR
hitting bottom edge of canvas then
reverse paddle movement
Ball begins play at Ball will point in a The ball To begin the game press making sure the ball does When space is clicked
middle of field at start random direction and space key not leave to work area sprite ball wil point in a random
of game and after each and move in that direction and glide there until
point direction hits another sprite
Ball bounces correctly When the ball The ball It triggers when the ball Making sure the where the
Ball increases speed When the ball The paddle it triggers when ball It would be hard to make a If sprite ball touches paddle1
each time it bounces touches paddle1, touches paddle variable for speed variable speed will increase the
off a paddle variable speed will balls speed by 2
increase by 2
Score a point for the If the ball sprite Bottom of the when ball touches the It would be hard to draw out When sprite ball touches sprite
opponent when the ball touches the bottom screen sprite bottom of screen sprite the sprite bottom of the screen pause
touches the left or right of the game sprite game and show game over
edge screen will say game
over.
Game ends when one When player2 Variable player2 when ball touches the It would be tricky to make it When ball touches bottom of
player reaches five variable reaches 5 bottoms of screen sprite so the game will end when screen sprite give variable
points show player 2 wins player reaches 5 points player to a point
Players can begin a when green flag is green flag When green flag is When green flag is clicked When green flag is clicked
new game clicked new game clicked reset and starting reset and starting restart the game
will start