Make an Endless Run Game on Scratch
Green highlight

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

Orange shooting star
Download Guide
Collect Badge
Background blob
Challenge Image
Skill Badge
Table of contents

Step-by-step guide to make an endless run game on Scratch

0:00/0:00

Here at SafeTube, we're on a mission to create a safer and more delightful internet. 😊

Scratch endless runner game tutorial

What you need
Optional colouring materials for drawing sprites, scratch account or scratch desktop editor

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!

Complete & Share
Challenge badge placeholder
Challenge badge

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

0:00/0:00

Here at SafeTube, we're on a mission to create a safer and more delightful internet. 😊

How to Make an Endless Runner Game in Scratch (Part 2)

4 Videos

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!

How do I make an endless runner game in Scratch?

Start a new Scratch project, add a player sprite and backdrop, and script a running animation by switching costumes in a loop. Add gravity and jump controls using y changes and conditionals. Spawn obstacles as clones that move left and delete off-screen. Add collision detection to trigger game over and a score variable that increases as obstacles pass. Test gameplay, tweak obstacle speed and spawn rate, and add sound and a restart screen.

What materials do I need to make an endless runner on Scratch?

You need a computer or tablet with internet access to Scratch (scratch.mit.edu) or the offline Scratch app, plus a mouse, touch input, or keyboard. Use Scratch’s built-in sprites, backgrounds, and sounds or import your own images and audio. A free Scratch account saves and shares projects. Optionally have a simple paper plan, headphones, and an adult nearby to help install or supervise younger children.

What ages are suitable for making an endless runner in Scratch?

This project is great for kids about 8 years and up who can read basic instructions and use a mouse or tablet. With guidance, children aged 6–7 can create simpler versions. Teens and families can expand features with variables, clones, and broadcasts. Adjust complexity to skill level and pair younger kids with an adult or older sibling to help with scripting, testing, and debugging.

What are the benefits and fun variations of making an endless runner?

Building an endless runner teaches sequencing, loops, variables, events, and debugging, boosting problem-solving and creativity when designing sprites and levels. It also builds perseverance through testing. For safety, avoid sharing personal info when publishing. Variations include changing themes (space, jungle), adding power-ups, multiple obstacle types, level progression, or leaderboards. Challenge older kids to add score multipliers, mobile controls, or animated enemy behaviors.
DIY Yeti Character
Join Frame
Flying Text Box

One subscription, many ways to play and learn.

Try for free

Only $6.99 after trial. No credit card required

Make an Endless Run Game on Scratch. Activities for Kids.