Create an endless runner game in Scratch by designing a moving character, spawning obstacles, adding scoring and controls, and testing gameplay mechanics.



Step-by-step guide to make an endless run game on Scratch
Step 1
Open Scratch and click "Create" to start a new project.
Step 2
Delete the default cat sprite.
Step 3
Choose or draw a player sprite and add at least two running costumes.
Step 4
Make a ground by painting a backdrop or creating a ground sprite and place it near the bottom of the stage.
Step 5
Create a variable named vy for the player (for this sprite only).
Step 6
Add this player script: when green flag clicked set vy to 0 forever change vy by -1 change y by vy end.
Step 7
Add this player script: when space key pressed if touching the ground then set vy to 12.
Step 8
Create an obstacle sprite for spikes or blocks.
Step 9
Add this obstacle script: when green flag clicked hide forever wait 1.5 seconds create clone of myself end.
Step 10
Add this obstacle clone script: when I start as a clone go to x:240 y:[ground y] show repeat until x < -240 change x by -5 wait 0.02 delete this clone end.
Step 11
Add this player collision script: forever if touching [obstacle] then broadcast [game over] end.
Step 12
Create a variable named score and add a script: when green flag clicked set score to 0 forever wait 0.5 change score by 1 end.
Step 13
Add a "when I receive [game over]" script that shows "Game Over" and stops the game or other scripts.
Step 14
Playtest the game by clicking the green flag and tweak obstacle speed spawn rate and jump height until it feels fun.
Step 15
Share your finished creation on DIY.org.
Final steps
You're almost there! Complete all the steps, bring your creation to life, post it, and conquer the challenge!


Help!?
What can we use if we can't access Scratch online or don't want to draw running costumes?
If you can't use the Scratch website, download Scratch Desktop to 'Open Scratch and click "Create"', and if drawing running costumes is hard, duplicate and flip a built-in sprite costume or use two frames of a built-in runner sprite as your player's two running costumes.
Why does my player sometimes fall through the ground or not jump, and how do I fix it?
If the jump doesn't work or the player falls through the ground, make sure the 'vy' variable is created for the player sprite only, the ground sprite's y position matches the y used in the obstacle clone script, and change the 'if touching [ground]' check to 'if y <= (ground y + 5)' or align the ground sprite precisely so the 'when space key pressed' block can detect the ground reliably.
How can I adapt the game for different ages or skill levels?
For younger players slow the game by increasing the obstacle spawn wait to 2–3 seconds, reduce the clone movement to change x by -3, and increase jump height by setting vy to 14 for easier landing, while for older kids make it harder by decreasing the wait to 0.8 seconds, increasing clone speed to change x by -7, and adding multiple obstacle sprites.
What are simple ways to expand or personalize the endless runner once the basics work?
Enhance the project by adding sound effects on jump and collision, create a 'power-up' sprite that clones and when touched increases the score or sets a 'speed' variable to slow obstacles temporarily, add a 'when I receive [game over]' backdrop that shows a custom Game Over screen, and then share the finished creation on DIY.org.
Watch videos on how to make an endless run game on Scratch
Facts about game development with Scratch
🏃 Endless runner games keep going until the player fails — mobile hits like Temple Run and Subway Surfers boosted the genre's fame.
🎯 Key mechanics for runners — spawning obstacles, detecting collisions, and tracking score — are great bite-sized coding challenges.
🌍 Scratch is a global community where millions of young creators share, remix, and learn from each other's projects and games.
🧩 Scratch uses colorful block-based coding that snaps together like puzzle pieces so kids can build games without typing code.
🐱 The Scratch cat is the friendly default sprite and mascot you meet in every new Scratch project — perfect for your runner!


Only $6.99 after trial. No credit card required