CODE CREATIVE
PONG
The game that started it all...
TASK #1
The "Pong" program is a recreation of the arcade classic in which two players need to hit a ball using a paddle. The first to three wins is declared the winner.
The first task is to watch the introduction video below
to get an idea of what the project entails. An extension exercise here is to use Boolean expressions involving variables to get the ball to bounce off the paddles, instead of the "Touching" block.
After watching the video, be sure to
open up the "Starter Pack"
. Make sure you click on the remix button after Scratch opens up so that it saves on your account.
TASK #2
TASK:
Get the player 1 and 2 paddles to move based on the
‘W, S and UP and DOWN’
keys.

HINT #1:
Use the
"NOT"
operator and
"When Key Pressed"
,
"Repeat Until"
, and
"Change Y By Blocks"
.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #3
TASK:
Make the paddles stop moving when they reach the top or bottom of the screen.

HINT #1:
Use the
"LESS THAN"
,
"GREATER THAN"
operators and the
"If"
and
"Y"
position blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #4
TASK:
Get the ball to move without using the
"Point in Direction"
and
"Move"
programming blocks.

HINT #1:
Create 2
"Variables"
dx and dy and use the
"LESS THAN"
and
"MULTIPLY"
operators, and use the
"Point in Direction"
,
"Turn Degrees"
,
"Set variable to"
,
"Forever"
,
"X Position"
,
"Y Position"
, and
"If"
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #5
TASK:
Get the ball to bounce off all 4 walls without using the
"If on edge bounce"
block.

HINT #1:
Create 2
"Variables"
dx and dy and the
"LESS THAN"
and
"MULTIPLY"
operators. Also, be sure to use the
"Point in Direction"
,
"Turn degrees"
,
"Set variable to"
,
"Forever"
,
"X Position"
,
"Y Position"
, and
"If"
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #6
TASK:
Get the ball to bounce off the paddles.

HINT #1:
You will need to use the
"GREATER THAN"
and
"LESS THAN"
operators and the
"If"
and
"Touching Sprite"
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #7
TASK:
Create a
score variable"
that increments when the ball goes off the screen.

HINT #1:
Create two
variables"
and use the
"Change Variable By"
block.

CHECK UP:
Watch the video below to check that you completed the task.
TASK #8
TASK:
Restart the game with the ball in the center of the screen.

HINT #1:
Use the
"Go To X/Y"
and
"Set Variable To"
blocks.

CHECK UP:
Watch the video below to check that you completed the task.
CHALLENGES EXERCISES
  1. When starting a round, have the ball fade into view.

  2. When starting a round, the ball says 1, 2, 3, Go!

  3. Create a beginning and ending screen.

  4. Have the words “click here” blink at the beginning screen.

  5. Program the ball to bounce off the paddles without using the ‘touching sprite’ block.

  6. Make the ball bounce off the top and bottom of the paddle.

  7. The ball travels in opposite directions on every restart.