
In this project, the Knight and Skater compete in a race. The Knight and Skater characters will alternate taking turns. Each turn will allow them to move forward a certain number of steps based on a random number generated. The Knight will aim to reach the finish line first. The game will include a victory sound and a costume change for the winner. If the Knight gets too far behind, there will be a conditional statement to add extra steps to help him catch up, showing basic game balance.



These are the high level steps to create this project. Try to create the project on your own first as much as possible, before checking the detailed solution samples below.
This section provides detailed, step-by-step instructions on how to build the project. There are many ways to create a project, so feel free to explore different approaches. Please note that these instructions are Al-generated, so errors may occur and the coding blocks may not map to Scratch exactly. But it should serve as very valuable references. Stay attentive as you follow along, and enjoy!
Start by choosing or creating two characters: a Knight and a Skater. You can find these in the Scratch library or draw your own. Set up a simple race track on the stage with a start and finish line. Position the Knight and Skater at the starting line.
For both the Knight and Skater, create a script that moves them forward by a random number of steps each turn. Use the 'pick random' block to determine the number of steps. Alternate turns between the Knight and Skater using a 'repeat until' loop to check if either has reached the finish line.
Once a character reaches the finish line, play a victory sound and change the winner's costume to a 'celebration' costume. Use an 'if' statement to check who reached the finish line first and trigger the sound and costume change accordingly.
To ensure the Knight doesn't fall too far behind, add a conditional statement that checks if the Knight is a certain distance behind the Skater. If so, give the Knight a few extra steps to help balance the game.
Run the game multiple times to ensure the mechanics work smoothly. Adjust the random step range or the catch-up distance if needed to make the game fair and fun.
It is common to have bugs in the code. Here are some of issues you might run into.
Enroll your child in award-winning online Scratch coding classes led live by experts and designed by professionals from Google, Stanford, and MIT.
The challenge continues: Enjoy even more Scratch tutorials dreamed up by other students or use your imagination to make your own!
Explore your child's grade level to find computer science classes and learning pathways that set your student up for success.