Create a Soccer Game on Scratch
Make a simple soccer game in Scratch by designing players, controls, goals, scoring, and basic ball physics while learning coding concepts and creativity.

About this tutorial
Make a simple soccer game in Scratch by designing players, controls, goals, scoring, and basic ball physics while learning coding concepts and creativity.
What you need
Step by step
- 1
Step 1
Open Scratch and click Create to start a new project.
- 2
Step 2
Choose or draw a player sprite and add it to the stage.
- 3
Step 3
Choose or draw a ball sprite and place it near the center of the stage.
- 4
Step 4
Pick a soccer field backdrop from Backdrops and set it as the stage background.
- 5
Step 5
On the player sprite add code so the arrow keys move the player (right arrow change x by 10 left arrow change x by -10 up arrow change y by 10 down arrow change y by -10).
- 6
Step 6
On the ball sprite add code so when the green flag is clicked it goes to the center points in a random direction forever moves 6 steps and if on edge bounce.
- 7
Step 7
On the ball sprite add code so if it is touching the player it points away from the player (point towards player then turn 180 degrees) and moves quickly a few steps.
- 8
Step 8
Create two goal sprites and place one at each end of the field to act as goal zones.
- 9
Step 9
Make two variables named Left Score and Right Score and show them on the stage.
- 10
Step 10
Add code to each goal sprite so when the goal touches the ball it increases the correct score by 1 broadcasts "Goal" and moves the ball back to the center.
- 11
Step 11
Add code to play a cheering sound and show a brief celebration when the "Goal" message is received.
- 12
Step 12
Add code so when the green flag is clicked both scores reset to 0 and the player and ball move to their starting positions.
- 13
Step 13
Add a simple opponent by creating a second sprite that points towards the ball and moves slowly to try to intercept it.
- 14
Step 14
Playtest the game and tweak player speed ball speed and goal positions until the game feels fun and fair.
- 15
Step 15
Share your finished soccer game project on DIY.org.
Fun facts
How do I create a simple soccer game in Scratch step-by-step?
Start by planning players, ball, goals and scoring. Add sprites for two players and a ball, then program player controls (arrow keys or WASD) using “when key pressed” and change x/y blocks. Give the ball simple physics by changing its direction when touching a player or edge, and add a variable for score. Broadcast a “goal” message to update score, play a sound, reset positions, and test and refine movement and collisions.
What materials or tools do I need to make a soccer game in Scratch?
You need a computer or tablet with internet access and a free Scratch account (scratch.mit.edu). A keyboard and mouse help for coding and testing. Optional items: headphones for sound effects, printable sketch paper to plan sprites and levels, and simple image-editing software if you want custom sprites. If offline, download the Scratch app. No advanced tools required—many kids create great games with just Scratch and creativity.
What ages is making a Scratch soccer game suitable for?
Making a Scratch soccer game suits kids about 7–16 years old. Younger kids (7–9) will enjoy simple controls and guided templates with adult help; older kids (10–16) can explore variables, broadcasting, and basic physics. For preschoolers, try ScratchJr for block-based storytelling. Adjust complexity to skill level: start with single-player and move to two-player or AI opponents as confidence grows.
What are the benefits of building a soccer game in Scratch for kids?
Creating a soccer game teaches coding basics like sequences, loops, events and variables while boosting problem-solving and logical thinking. It fosters creativity through sprite design and level ideas, improves math intuition (coordinates, velocity), and encourages debugging persistence. Working with friends or family builds collaboration and communication. Plus, students get immediate, fun feedback when their code makes a playable game, which supports confidence and continued learning.
Watch & Learn
Need help?
What can I use if I can't find the cheering sound or the soccer field backdrop?
Use Scratch's built-in sounds like Applause or Pop and either draw a simple green rectangle field in Backdrops or upload a photo from your device to replace the cheering sound and soccer field backdrop.
The ball isn't bouncing at the edges or reacting when it touches the player—what should I check?
Check that the ball's 'when green flag clicked' script has a forever loop containing 'move 6 steps' and 'if on edge, bounce' and that the collision code uses 'if touching [Player] then point towards [Player] turn 180 move (fast) steps' inside a loop so collisions are detected continuously.
How can I adapt this project for younger or older kids?
For younger kids simplify controls and visuals by using only arrow-key movement with change x/y by ±5 and set the ball to move 4 steps, while older kids can add smarter opponent behavior, more scoring rules using Left Score and Right Score, and finer speed tuning during playtesting.
How can we enhance or personalize the soccer game beyond the instructions?
Add power-up sprites that when touched change player speed or ball behavior, create a timer variable to end matches, swap player or goal costumes for celebrations when the 'Goal' broadcast is received, and then share the finished project on DIY.org.