Difference between revisions of "Pong"

From WLCS
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
'''Objectives:'''
 
'''Objectives:'''
* You will use Scratch to create Pong
+
* You will create Pong using your programming language of choice (e.g. Scratch, Python)
 
* The Pong game will require that you use math, variables, conditionals, and loops!
 
* The Pong game will require that you use math, variables, conditionals, and loops!
  
Line 7: Line 7:
 
* [http://www.ponggame.org/ Pong Game]
 
* [http://www.ponggame.org/ Pong Game]
  
'''Pong Directions:'''
+
'''Requirements:'''
<!--
+
* Background with dashed line through the middle
* Paddles
+
* Two paddles parallel to each other
** Paddle on the left that is controllable with S and W keys
+
** Left paddle goes up and down using S and W keys
** Paddle on the right that is controllable with Up and Down keys
+
** Right paddle goes up and down using Up and Down keys
* Background has a “net” or a dashed line through the middle
+
* Ball movement and placement
* Ball moves across the screen and bounces:
+
** Ball starts from the middle
** When it hits a paddle
+
** Moves around at angles
** Top and bottom of screen
+
** Bounces when it hits a paddle
* Resetting the ball’s placement
+
** Bounces when it hits the top and bottom
** 1st time – randomize direction
+
* Scoreboard
** Every other time, direct towards player who just scored
+
** If the ball goes beyond the left side, then the right player gets a point
* Score board at the top
+
** If the ball goes beyond the right side, then the left player gets a point
** When ball passes the right edge of the screen, left player gets point
+
** When either player reaches 10, then they win
** When ball passes the left edge of the screen, right player gets point
+
* Sounds
** If either player hits 10 points, then they win
+
** Played when it hits the paddles
* Sound
+
** Played when it hits the bottom or top
** When the ball hits a paddle
+
** Played when a player scores
** When the ball bounces off the wall
+
 
** When the ball goes beyond the screen
+
'''Bonus Requirements:'''
-->
+
* Allow the paddles to move left and right using the A, D, Left, and Right arrow keys
 +
* Allow the paddles to rotate
 +
* Gradually change the speed of the ball as the points get higher
 +
* Difficulty selection screen (e.g. Beginner, Intermediate, Expert)
 +
* Change the speed of the ball depending on where the ball hits the paddle
 +
* Items that randomly appear that give players:
 +
** increased speed
 +
** decreased speed
 +
** a longer paddle
 +
** a shorter paddle
 +
** freeze (i.e. paddle cannot move)
 +
** a projectile that can fire and disable the other player's paddle
  
 
'''Grading Rubric:'''
 
'''Grading Rubric:'''
* 2 pts - right paddle moves up and down with keyboard
+
* 1 pt - background and graphics
* 2 pts - ball bounces properly off the right paddle
+
* 1 pt - sounds play when hitting paddles and edges
* 2 pts - left paddle moves up and down with keyboard
+
* 2 pts - paddles move up and down with keyboard
* 2 pts - ball bounces properly off the left paddle
+
* 2 pts - ball bounces properly off the paddles
* 2 pts - Player 1 and Player 2 points are tracked and displayed properly
+
* 2 pts - Player 1 and Player 2 scores work and display properly

Latest revision as of 11:25, 9 October 2014

Objectives:

  • You will create Pong using your programming language of choice (e.g. Scratch, Python)
  • The Pong game will require that you use math, variables, conditionals, and loops!

Resources:

Requirements:

  • Background with dashed line through the middle
  • Two paddles parallel to each other
    • Left paddle goes up and down using S and W keys
    • Right paddle goes up and down using Up and Down keys
  • Ball movement and placement
    • Ball starts from the middle
    • Moves around at angles
    • Bounces when it hits a paddle
    • Bounces when it hits the top and bottom
  • Scoreboard
    • If the ball goes beyond the left side, then the right player gets a point
    • If the ball goes beyond the right side, then the left player gets a point
    • When either player reaches 10, then they win
  • Sounds
    • Played when it hits the paddles
    • Played when it hits the bottom or top
    • Played when a player scores

Bonus Requirements:

  • Allow the paddles to move left and right using the A, D, Left, and Right arrow keys
  • Allow the paddles to rotate
  • Gradually change the speed of the ball as the points get higher
  • Difficulty selection screen (e.g. Beginner, Intermediate, Expert)
  • Change the speed of the ball depending on where the ball hits the paddle
  • Items that randomly appear that give players:
    • increased speed
    • decreased speed
    • a longer paddle
    • a shorter paddle
    • freeze (i.e. paddle cannot move)
    • a projectile that can fire and disable the other player's paddle

Grading Rubric:

  • 1 pt - background and graphics
  • 1 pt - sounds play when hitting paddles and edges
  • 2 pts - paddles move up and down with keyboard
  • 2 pts - ball bounces properly off the paddles
  • 2 pts - Player 1 and Player 2 scores work and display properly