PONG PROJECT SPECS
CODING PROJECT #2 - PONG
Students will use custom blocks to implement a well-written and engineered version of the classic arcade game Pong.
Overview
< WAYYYYY back In 1972 (I was 11 at the time!) , when video games were still very new and relatively unknown, a new game took the world by storm. A simple simulation of tennis using two-dimensional graphics, minimal sounds, and extremely basic controls, Pong became the first arcade game to achieve widespread popularity and is credited as the genesis of the modern video game industry.
Today, the game has been played, remade, spun-off, and referenced innumerable times and it remains, to many, the single most identifiable and recognizable game in the history of video games. Oh an just FYI, Mr W dropped *quite a few* quarters into that game back in the day….. (Just say’n)
Game play
Pong is played by two players each controlling a paddle with the goal of defending their end of the "field."
- A ball begins play in the middle of the screen and, at the start of each round, moves in a random direction.
- The ball bounces off the players' paddles.
- Each time the ball bounces off a paddle, its speed increases by a small amount.
- When the ball bounces off a paddle, its direction is reversed with a small random variation to add unpredictability to the game.
Scoring
- If the ball touches the left or right edge of the field, a point is scored for the opponent of the player who was defending that edge and the ball resets to the middle of the field.
- When one player reaches 5 points, the game is over and that player is the winner.
- The winner is announced on the screen and the players are given the opportunity to start a new game.
Player Control
-
Paddles are positioned a short distance away from the side they are defending, and can only move up and down, not side to side.
-
Each player should have two keys to control the movement of their paddle: one for up, and one for down.
-
Paddles move at a set, constant speed that is the same for both players.
-
The player on the left will control their paddle usually with the 'w' and 's' keys.
-
The player on the right will typically use the up arrow and down arrow keys.
Implementation Details
Custom Blocks
-
You should use custom blocks throughout your code to generalize common operations and increase the readability and maintainability of your code. The following functions MUST be present in your code:
- Left paddle operation is controlled by one function
- Right paddle operation is controlled by one function
- Ball motion is controlled by one function
- Scoring is controlled by one function
-
At least one of your functions blocks must include parameters to “receive” data from the main "calling" program.
-
Do not limit yourself to just three blocks: use custom blocks (including arguments and reporters) anywhere you feel it will help your code. Part of your grade will be based on not only meeting the minimum usage requirement but also on your decisions of when, where, and how to use custom blocks.
-
All variables MUST be defined *local* by using the ‘create script variable’ commands.
-
All parameters inside functions must match the variables “passed-in” by the calling functions.
-
The broadcast block is not allowed at anytime for any reason.
-
Globals variables that allow for data/input to be shared throughout your program should only be used as a last resort and will detract from your overall grade.
Required Checkpoints
Check Point #1: Players can control paddles; the ball starts in the middle, moves in a random direction, and bounces: Friday, March 27th
Check Point #2: The ball speeds up when it hits a paddle, and resets to the middle when it hits the left or right edge: Wednesday, April 3rd
Last Check Point: A point is scored when the ball hits the edge on the opponent's side of the field; the game ends when one player reaches five points. Monday: April 8th.
Game is due: Wednesday, April 10th-- Finishing touches are added:
- Scores are displayed prominently at the end of the game.
- Use of variables on the screen to display the score is acceptable for Rookies ONLY.
- Users can accept a system prompt to play the again again with all values reset to zero.
PONG Grading Rubric (Rookies)
| Look & Feel/Game Play |
Check |
Players can control left-side paddles with required left-side keys |
1 points |
|
Players can control right-side paddles with required right-side keys |
1 points |
|
Ball begins play at middle of field at start of game |
1 points |
|
Ball begins play at middle of field at after each point |
1 points |
|
Ball bounces correctly off ALL parts of the paddle |
4 points |
|
Ball increases in speed at a reasonable rate each time it bounces off a paddle |
3 points |
|
A point is scored for the opponent each time the ball touches the left or right edge |
3 points |
|
Game ends when ne player reaches five points |
1 points |
|
Winning player is shown when game ends |
1 point |
|
Players can begin a new game AT ANY TIME |
1 point |
|
SUBTOTAL: 17 pts |
|
Implementation/Technical/Coding |
|
Game play is smooth, polished, and intuitive |
3 points |
|
Program shows good creativity and effort |
2 points |
|
Program is well-commented (think Goldilocks!) |
3 point |
|
Program show appropriate style |
1 point |
|
Program includes at least three custom blocks, including at least one where arguments are passed to waiting parameters |
2 points |
|
All arguments passed-in to functions match parameters in those functions |
2 points |
|
All variables are declared local (script variables) |
2 points |
|
SUBTOTAL: 15 pts |
|
|
|
|
PROJECT TOTAL: |
32 pts |
|
═══════════════════════════
PONG Grading Rubric (Senseis)
| Look & Feel/Game Play |
Check |
Players can control left-side paddles with required left-side keys |
1 points |
|
Players can control right-side paddles with required right-side keys |
1 points |
|
Ball begins play at middle of field at start of game |
1 points |
|
Ball begins play at middle of field at after each point |
1 points |
|
Ball bounces correctly off ALL parts of the paddle |
1 points |
|
Ball increases in speed at a reasonable rate each time it bounces off a paddle |
1 points |
|
A point is scored for the opponent each time the ball touches the left or right edge |
1 points |
|
Game ends when ne player reaches five points |
1 points |
|
Winning player is shown when game ends |
1 point |
|
Players can begin a new game AT ANY TIME |
1 point |
|
SUBTOTAL: 10 pts |
|
Implementation/Technical/Coding |
|
Game play is smooth, polished, and intuitive |
1 points |
|
Program shows good creativity and effort |
1 points |
|
Program is well-commented (think Goldilocks!) |
1point |
|
Program show appropriate style |
1 point |
|
Program includes at least three custom blocks, including at least one where arguments are passed to waiting parameters |
1 points |
|
All arguments passed-in to functions match parameters in those functions |
1 points |
|
All variables are declared local (script variables) |
1 points |
|
SUBTOTAL: 7 pts |
|
Challenge: Users can choose from 2 person game or to play against the computer in autonomous mode. All game play is the same. |
|
|
SUBTOTAL: 15 |
|
PROJECT TOTAL: |
32 pts |
|
═══════════════════════════