Scratch game making tutorial 66

Boxing contest

In this tutorial you will make a game in which 2 boxers fight it out. The scripts that control them will ensure the winner is completely random.


1. Create a new Scratch game .. File>New


2. Click the "Paint new sprite" button under the stage, fill the background with a colour, and then use the text tool to create these instructions ..

Click OK and re-name it "Instructions".


3. Add these scripts to "Instructions" ..


4. Select the cat sprite under the stage. Re-name it "boxer 1". Go to its Costumes tab and click the "Edit" button to edit the first costume "costume1". Use the paint brush to add some coloured boxing gloves to him ..


Do the same for "costume2".


5. Now copy "costume1" and re-name it "hit". Edit it to look like boxer 1 has just been punched ..


6. Make another copy of "costume1" and re-name it "punch". Edit it to look like it is punching. Make sure the arm is stretched out like this ..


You should now have these 4 costumes ..


7. Now save you game .. File>Save as .. call it "Boxing contest".


8. With "Boxer 1" selected, create a new variable "For this sprite only" called "health". Position it on the top left of the stage.


9. Duplicate "Boxer 1" and re-name the duplicate "Boxer 2". Edit all the costumes so that "Boxer 2" has a different colour for his gloves, like this ..


10. Now add these scripts to "Boxer 1" ..

Re-save your game.


9. Drag all the "Boxer 1" scripts to the "Boxer 2" thumbnail under the stage to duplicate them. Now carefully compare the scripts and edit the "Boxer 2" scripts so they are like this (look carefully!) ..


10. Right-click to download this sprite of a boxing ring and then import it onto your stage background.


11. Re-save your game.


12. You're finished. Well done. Press "B" to start the game. Press "E" to end.


13. What modifications can you make?