
Try City Transport Race for fun Scratch Project!
City Transport Race
Platform: Scratch
Level: advanced
In this project, students will create a racing game where the Car, Ship, and Train compete to finish first while navigating through a city. Each vehicle will have custom blocks for their unique movement mechanics and must follow different routes with specific coordinates. Students will use a list to keep track of each vehicle's speed and distance covered, updating it with a timer to see who can reach the finish line the fastest.
Backdrop And Sprite Images For The Project




City Transport 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.
- Set up the stage and sprites.
- Create custom blocks for movement.
- Set up lists to track speed and distance.
- Implement a timer to track the race duration.
- Determine the winner and display results.
City Transport 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!
Create a city-themed backdrop for the race. Add three sprites: Car, Ship, and Train. Position them at the starting line. Ensure each sprite has a clear path to follow on the stage.
For each sprite, create a custom block to define its unique movement mechanics. For example, the Car might move in a straight line, the Ship might move diagonally, and the Train might follow a track. Use the 'define' block to create these custom movements.
Create lists to keep track of each vehicle's speed and distance covered. Initialize these lists with starting values. Update the lists as the vehicles move across the stage.
Use the timer block to keep track of how long the race takes. Display the timer on the stage. Update the vehicle positions based on their speed and the elapsed time.
At the end of the race, compare the distances covered by each vehicle to determine the winner. Display the results on the stage, showing which vehicle finished first, second, and third.
Common Potential Issues in City Transport Race Project
It is common to have bugs in the code. Here are some of issues you might run into.
- Ensuring that the custom movement blocks are correctly defined so that each vehicle moves as intended.
- Keeping the lists updated accurately with each vehicle's speed and distance covered.
- Making sure the timer is reset and functions correctly to track the race duration.
Extra Challenges For City Transport Race
- Add obstacles on the track that vehicles must avoid, requiring them to change their paths.
- Introduce power-ups that temporarily increase a vehicle's speed when collected.
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.
Grades K-2
Start coding with ScratchJr, and make interactive stories and gamesGrades 2-6
Code games and animations with beginner-friendly Scratch codingGrades 5-9
Fast-paced introduction to coding: build games, stories, and animationsGrades 3-6
Code a new fun Scratch game every weekExplore 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.