Geometry
The screen where you can see what happens when
you play your game is called the STAGE.
The SCRIPT BANK is where the types of instructions
are stored.
The SPRITES are where you store and select the STAGE and
COSTUMES
SCRIPTS AREA is where you put your instructions
The SCRIPT BLOCKS are where the
instructions of what your
SPRITES can do!
Project 3 – Pong
What will we learn?
How to make a two player game
How to make a ball bounce off a bat
How to create a scoring zone
Use the operator block to create random numbers for the ball movement
Create two paddle sprites
Use sprite paint editor rectangle shape to draw a paddle sprite
Create a ball sprite
Use sprite paint editor circle shape to draw a ball sprite
Make the ball move
Set the ball off in a random direction.
Make the ball move
Set the ball off in a random direction.
Make the blue paddle move
Control the blue sprite with the w and s keys
Make the blue paddle move
Control the blue sprite with the w and s keys
Make the red paddle move
Control the red sprite with the up and down arrow keys
Make the red paddle move
Control the red sprite with the up and down arrow keys
Make the ball bounce off the red paddle
If the ball touches the red paddle pick a random direction away from the red paddle
Make the ball bounce off the red paddle
If the ball touches the red paddle pick a random direction away from the red paddle
Make the ball bounce off the blue paddle
If the ball touches the blue paddle pick a random direction away from the blue paddle
Make the ball bounce off the blue paddle
If the ball touches the blue paddle pick a random direction away from the blue paddle
What next?
We need to make a scoring system
How are the players going to score
Create 2 scoring zones
Draw a thin blue scoring line behind the blue paddle and a thin red scoring line behind the red paddle. Use different colours to the paddles.
Create 2 variables for the scores
Create the variables and move them to sensible positions
Create 2 variables for the scores
Create the variables and move them to sensible positions
Increment the scores
Increase the cores by one when the ball touches the score zone. You also need to move the ball back to the centre to start a new turn.
What next?
Reset the scores to zero at the start of each game.
End the game when a player has reached a certain score
Set the scores to zero at the start of the game
Set the scores to zero when the green flag is clicked.
Set the scores to zero at the start of the game
Set the scores to zero when the green flag is clicked.
End the game when a player has reached a certain score
Use the operator with a variable and a number of your choice to end the game.
End the game when a player has reached a certain score
Use the operator with a variable and a number of your choice to end the game.
Ideas for starters
Look at the game on the board/screens
Identify the things you will need to create to play the game
Identify what each thing needs to do
Find 5 examples of Sprites you could use for your game.
How do you plan to edit these sprites/make different costumes for them?
List 3 features of good game design
Identify an audience for your game
Ideas for plenaries
What alterations have you made already?
How would you make the game child friendly?
How would you make the game appeal more to adults?
What did you find easy about making the game?
What did you find challenging about making the game?
What advice would you give to a student just starting to make the game for the first time?
How could you improve your game?
Look at the scratch cards in the Scratch ideas folder. Create a scratch card for an action in scratch that you have learned today.