Sort of Ping Pong Game

This guide has been designed to help you create a simple game. Follow these step-by-step instructions to create an interesting set of effects.

Use the paddle to keep the ball from hitting the ground.

Stage 1 - Making the Ball

Start a new Scratch project - "File" and then "New"

Delete the cat sprite; right click and select "Delete".

Add a new sprite by clicking on "Paint new sprite".

Use the "paint" facility to make a small ball.

Use the "elipse" tool to draw a circle. Make sure that you use the filled elipse and if you hold "shift" while you draw it will be a circle not an elipse (although a circle is a special elipse mathematically speaking).

Press "OK" to save the sprite.

The sprite is called "sprite1" and we need a better name than this.

Rename the sprite by typing over the name "Sprite1" with the name "ball".

1. Screenshot your project so far and describe creating a sprite using paint.

 

Screenshot your project so far and describe creating a sprite using paint.

Stage 2 - Making the Paddle

To make the bat create a new sprite by clicking on "Paint new sprite".

Use the line tool to draw a short line parallel to the bottom of the screen. Use the checkered squares to help you to get the line level and straight.

Rename the sprite as "paddle"

2. Screenshot your project so far and describe adding the paddle.

 

Stage 3 - Adding scripts to the Paddle and the ball

Now give the ball this script. The ball will be set to the centre of the screen (0,0) and pointed in a random direction and then iot will move "forever".

Give the paddle this script.

See if you can make the ball bounce on the paddle.

3. Screenshot your project so far and describe making the ball bounce on the paddle.

 

Stage 4 - Keeping score

You will need a variable to store the number of lives that you use up (if you miss the ball!)

Make a variable called "Lives".

Lives should be visible on the screen.

Add this script to the stage. This set the number of lives to be 3 at the start. The idea is that every time that you miss the ball you will lose a life. When you have no lives left, the game will end.

4. Screenshot your project so far and describe how the project keeps score.

 

Stage 5 - Create a floor

Now create a floor for the ball to land on if you miss.

Create a new sprite and draw a straight line the width of the screen. Again use the checkered design of the background to make the line straight and level. Choose "Red" as the colour so that the ball can recognise when it has hit the floor.

This is the line, it will appear in the middle of the screen. Change the name of the sprite to be "Floor".

Add this script to the floor to make it move to the right place by itself.It needs to be lower than the paddle that you made earlier.

Screenshot your project so far and describe changing the background of a project using paint.

5. Screenshot your project so far and describe how the floor was added.

 

Stage 6 - Now change the script for the ball to include the floor

Note that when the ball hits the floor it will start at the centre of the screen again.

6. Screenshot your project so far and describe how the project keeps score when the floor is touched.

 

Stage 7 - Extension

Change the script so that the game counts how many times the ball has bounced onthe paddle and then at set intervals the ball speeds up..

7. Screenshot your project so far and describe how the ball can be made to speed up.

 

Year 8 Extension

Turn the game through 90 degrees so that the bat and the floor is on the right hand side of the game as is the wall. Add a second bat and floor on the left hand side to be controlled by another player and make it a two player game.

8. Screenshot your project so far and describe how you made the two player game.

 

Recent Posts

May 24

Repairing a hyperspace window

You may have noticed the time shift in the Blue coridor, there is a redshift at certain times of the day; this has caused the bells to malfunction and the PCs are runing slow as the server room is also moving ever so slowly into the 5th dimension. The Lightspeed engineers are working hard to fix the hyperspace window being generated by the tidal effects of big data and the weaknesses in the walls caused by excessive data mining. Cambridge Analytica's data scraping has also contributred to the weakness in the space time continuum. There is no need to be afraid as everything is should be resolved in the near future; nevertheless steps are being taken, mostly from the gold staircase.

Any further information will be included here when and if we get it.

July 18

Adventuring with A GDPR SUrveyor

The GDPR surveyors will be in the College in the near future checking that you understand your obligations under GDPR. Are you aware of the consequences? Do you know who knows about you? Do you know what the people you don't know about, know about you? Have you checked your own settings? Are you privacy minded? The GDPR surveyors will check. They know you, possibly better than you do but maybe not as well as the Internet knows you.

July 14

Games for Free

There are a number of games that you can get for free that are really good. They are really good at collecting all of your data and passing it on to someone else. You don't know who they are and you don't know why they are collecting your data. They have your data and access to your friends. In minutes they have your friends' data and are collecting the data from their friends. If its a good game you will even tell your friends about it so you do their sneakiness for them and still tell your friends. It will never happen to you but hey that game...

Spotlight

Neural Implants

The pros and cons. Mostly cons.

Be permanently connected to Google and you can ask Alexa in your head; only you can hear the answer...