Link to the basketball game on Scratch

Step 1 - Rename the Cat Sprite

Click the blue-white "i" button to open the Info Panel, then rename it "Cat".

Step 2 - Change the Backdrop

Click the landscape button next to "New backdrop" and select "brick wall1".

Step 3 - Create the "y velocity" Variable

Click on the Cat icon in the lower left area. Click the "Make a Variable" button and name it "y velocity". Click on "For this sprite only".

Step 4 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 5 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 6 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Test #1

Click on File > Save. Test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 7 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 8 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 9 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 10 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 11 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Test #2

Click on File > Save. Click the green flag. Then test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 12 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 13 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 14 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Test #3

Click on File > Save. Click the green flag. Then test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 15 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 16 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 17 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Test #4

Click on File > Save. Test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 18 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Step 19 - Add Code to the Cat Sprite

Add this code to the Cat sprite.

Test #5

Click on File > Save. Test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 20 - Create a New Hoop Sprite

Draw a yellow hoop using the Ellipse drawing tool.

Step 21 - Rename the New Sprite to "Hoop"

Click the blue-white "i" button to rename the sprite to Hoop.

Step 22 - Add Code to the Hoop Sprite

Add this code to the Hoop sprite.

Step 23 - Add Code to the Hoop Sprite

Add this code to the Hoop sprite.

Step 24 - Add Code to the Hoop Sprite

Add this code to the Hoop sprite.

Test #6

Click on File > Save. Test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 25 - Add the Cheer Sound Effect

With the Hoop sprite selected, click on the Sounds tab and select "cheer".

Step 26 - Create the "swoosh" Broadcast Message

Add the "when I receive" block and create a new "swoosh" message.

Step 27 - Add Code to the Hoop Sprite

Add this code to the Hoop sprite.

Step 28 - Create the Basketball Sprite

Open the Sprite Library and select the Basketball.

Step 29 - Draw the Hitbox Sprite

Click the paintbrush button to create a new sprite. Draw a black box in the center.

Step 30 - Rename the New Sprite "Hitbox"

Click the blue-white "i" button and rename the new sprite "Hitbox".

Step 31 - Add Code to the Hitbox Sprite

Add this code to the Hitbox sprite.

Step 32 - Add Code to the Hitbox Sprite

Add this code to the Hitbox sprite.

Test #7

Click on File > Save. Test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 33 - Add Code to the Hitbox Sprite

Add this code to the Hitbox sprite.

Step 34 - Make the "Player 1 Score" Variable

Click the "Make a Variable" button to make a "Player 1 Score" variable. Make sure it is "for all sprites".

Step 35 - Make the "y velocity" Variable

With the Basketball sprite selected, click the "Make a Variable" button to make a "y velocity" variable. Make sure it is "for this sprite only".

Step 36 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 37 - Add the "pop" Sound Effect

On the Sounds tab, click the speaker button and add the "pop" sound effect.

Step 38 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 39 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 40 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 41 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 42 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 43 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 44 - Add Code to the Basketball

Add this code to the Basketball sprite.

Test #8

Click on File > Save. Test to make sure when the space key is pressed:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 45 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 46 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 47 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 48 - Add Code to the Basketball

Add this code to the Basketball sprite.

Test #9

Click on File > Save. Test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.

Step 49 - Create the "made basket" Variable

Click "Make a Variable" to make a "made basket" variable. Make sure it is "for this sprite only".

Step 50 - Add Code to the Basketball

Add this code to the Basketball sprite.

Step 51 - Add Code to the Basketball

Add this code to the Basketball sprite.

Test #10

Click on File > Save. Test to make sure your program has the following:

If the program doesn't do all of these things, check the previous steps to make sure you copied the code exactly. If you still can't figure it out, ask for help.