

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Scratch coding example - ball game
Typology: Summaries
1 / 3
This page cannot be seen from the preview
Don't miss anything!


A ball falls from the sky. When you click on it, it glides to a random position at the top of the screen and begins to fall again, but a little faster. If you catch it 6 times, you win. If the egg touches the floor, you loose. RIGHT mouse click on the cat and select 'delete' Click ‘Choose new sprite from file’ Click on ‘costumes’ Double click ‘Things’ Click ‘baseball1’ Click ‘ok’ Rename the sprite to ‘ball’. Click ‘Paint new sprite’ Draw a long black line (this will be the floor). Click ‘ok’. Rename the sprite to ‘floor’. Position it at the bottom of the screen. You also need to import TWO sprites from the shared area (or copy them to your home area first). They are: Game Over.png You Win.png Name these sprites: gameover win Click on ‘stage’
Click the ‘backgrounds tab’, Click on ‘Import’ Locate a suitable background. Click ‘ok’. Click ‘Variables’ Click ‘Make a variable’ Type in ‘score’. Click ‘ok’. Click the ‘ball’ sprite. Add the blocks as shown. To create a broadcast, select the ‘new’ option at the bottom of the dropdown list on the block itself. Click the ‘Game Over’ sprite.