
Try Knights vs Skaters: Obstacle Race for fun Scratch Project!
Knights vs Skaters: Obstacle Race
Platform: Scratch
Level: beginner
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.
Backdrop And Sprite Images For The Project



Knights vs Skaters: Obstacle Race: Solution Outline
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.
- Create the Knight and Skater characters and set up the stage.
- Program the movement for each character using random steps.
- Add a victory condition with sound and costume change.
- Implement a catch-up mechanic for the Knight.
- Test and refine the game mechanics.
Knights vs Skaters: Obstacle Race Sample Solutions
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.
Common Potential Issues in Knights vs Skaters: Obstacle Race Project
It is common to have bugs in the code. Here are some of issues you might run into.
- Ensure the random steps are balanced so neither character has an unfair advantage.
- Make sure the victory condition triggers correctly when a character reaches the finish line.
- Check that the catch-up mechanic only activates when the Knight is significantly behind.
Extra Challenges For Knights vs Skaters: Obstacle Race
- Add obstacles on the track that slow down the characters when they hit them.
- Create a timer that tracks how long the race takes and displays it at the end.
Learn Scratch Coding Skills
Enroll your child in award-winning online Scratch coding classes led live by experts and designed by professionals from Google, Stanford, and MIT.
Scratch Junior
Grades K-2
Scratch Ninja
Grades 2-6
Accelerated Scratch
Grades 5-9
Intermediate Game Building with Scratch
Grades 3-6
Explore More Fun Scratch Practice
The challenge continues: Enjoy even more Scratch tutorials dreamed up by other students or use your imagination to make your own!
Find Best Classes For Your Child
Explore your child's grade level to find computer science classes and learning pathways that set your student up for success.