How to Make a Jumping Game in Scratch | Tutorial

Alphabets Sounds Video

share us on:

In this lesson, we learned how to create a jumping game in Scratch, where a character jumps over moving obstacles. The tutorial guided us through five key steps: making the character jump with the space key, creating and animating a moving obstacle, implementing a game-over condition, adding more obstacles for increased challenge, and keeping track of the player’s score. By the end, we had a fun and interactive game that could be further customized and expanded.
  1. What do you need to do to make your character jump in the game?
  2. How can you create an obstacle for your character to jump over?
  3. What happens to the score when the player jumps over an egg successfully?

How to Make a Jumping Game in Scratch

Hi, everyone! Welcome to a fun tutorial where we’ll learn how to make a jumping game using Scratch. By the end of this guide, you’ll have a cool game where a character jumps over moving obstacles. We’ll do this in five easy steps: make your character jump, create a moving obstacle, stop the game when needed, add more obstacles, and keep score. Let’s get started!

Step 1: Make Your Character Jump

First, let’s choose a character for our game. You can pick any character you like; I’ll choose a cute chick. Next, let’s select a backdrop. I’ll use a blue sky to make it look nice. To make our character jump, we’ll use the “change y by 10” block. This block makes the character move up. If we repeat this 10 times, the character will jump really high. To make it come back down, we’ll use “change y by -10” in another repeat loop.

We want the character to jump when we press the space key. So, let’s add the “when space key pressed” block. Now, every time you press the space key, your character will jump! To make it even more fun, let’s add a sound effect using the “start sound Chirp” block.

Step 2: Create a Moving Obstacle

Now, let’s create something for our character to jump over. We’ll pick an obstacle, like an egg. Let’s make the egg a bit smaller by setting its size to 80, so it’s easier to jump over. We want the egg to start on one side of the screen and move to the other side. To do this, we’ll use the “go to x and y” block to set its starting position.

In Scratch, every spot on the stage has an X and Y coordinate. X tells us how far left or right something is, and Y tells us how high or low it is. Drag the egg to where you want it to start, and the “go to” block will update with the correct coordinates. To make the egg move across the screen, use the “glide to X Y” block. Drag the egg to its ending spot, and the glide block will update.

Step 3: Stop the Game

We want the game to stop if the character runs into the egg. There’s a block called “stop all” that stops everything in your project. We can make the egg wait until it touches the chick, and if it does, the game will stop. Let’s test it out. If the chick doesn’t jump in time, everything stops!

To make sure the chick doesn’t get stuck in the air, let’s set a starting position for it. Drag the chick to where you want it to start and use the “go to” block to set that position when the game begins.

Step 4: Add More Obstacles

To make the game more exciting, let’s add more obstacles. Right-click on the egg and click “duplicate” to create another egg with the same code. Now, we have two eggs! To make them appear at different times, let’s make the second egg wait one second before it starts gliding. We can also make it “hide” when the project starts and “show” after waiting.

Step 5: Keep Score

Finally, let’s add a score to the game. We’ll create a variable called “score” to keep track of points. Every time the player successfully jumps over an egg, we’ll increase their score by one. If the player loses and the game restarts, we’ll set the score back to zero.

And there you have it! You’ve made a jumping game in Scratch. You can try adding more obstacles or changing the backdrop when the player reaches a certain score. Have fun creating, and happy scratching!

  • What kind of character would you choose for your jumping game, and why? Can you think of any other fun characters that might be interesting to use?
  • Have you ever played a game where you had to jump over obstacles? What was it like, and how did it make you feel when you successfully jumped over them?
  • If you could add any obstacle to your game, what would it be? How would you make it challenging but still fun to play?
  1. Design Your Own Character: Use your imagination to draw your own character on paper. Think about what kind of character you would like to see jumping in your game. Is it a superhero, an animal, or maybe a robot? Once you have your drawing, try to recreate it in Scratch using the “Paint” tool. This activity helps you understand how characters are created and customized in Scratch.

  2. Obstacle Course at Home: Create a simple obstacle course in your living room or backyard using pillows, boxes, or other safe items. Pretend you are the character in your game and try to jump over the obstacles. As you play, think about how the obstacles in your game move and how you can avoid them. This activity helps you relate the game mechanics to real-life movements and challenges.

  3. Score Keeping Challenge: With a friend or family member, play a game where you jump over a line or object. Each time you successfully jump over, you earn a point. Keep track of your score using a piece of paper. Discuss how keeping score in real life is similar to how the score is kept in your Scratch game. This activity helps you understand the concept of variables and how they are used to keep track of information.

Sure! Here’s a sanitized version of the YouTube transcript:

Hi, everyone! It’s Zoe from the Scratch team, also known as Zinnea. Today, I wanted to show you how to make a jumping game in Scratch. By the end of this tutorial, you’ll be able to create a game where a character jumps over moving obstacles. We’ll do this in five steps: make your character jump, create a moving obstacle, stop the game, add more obstacles, and keep score. Let’s get started!

First, let’s pick a character and make it jump. You can choose any character you want; I will pick the chick. Let’s also choose a backdrop. I’ll use the blue sky. To make the character jump upwards, we can use the block “change y by 10.” If we repeat that 10 times, it will go up really high. Now, we also want it to come back down. To do this, we can use “change y by -10” and put that in a repeat loop as well.

It would be fun for the character to jump when we press the space key, so we can add the “when space key pressed” block on top. Now we can make the character jump with the space key. We can also enhance the jump by adding a sound effect, so let’s include the “start sound Chirp” block.

Now our character can jump! Next, let’s create a moving obstacle for our character to jump over. First, let’s pick an obstacle. It could be anything you’d like; I will pick the egg. I’m going to make the egg a little smaller by setting its size to 80. You want the obstacle to be a bit smaller than your character so that it can jump over it.

Now, we want our obstacle to start on one side of the screen and glide to the other side. To tell the egg to start at a specific position, we can use the “go to x and y” block. In Scratch, every position on the stage has a certain X and Y coordinate. X represents how far your sprite is from one side of the screen to the other, and Y represents how high up your sprite is.

To position the egg, just drag it to where you want it to go, and the “go to” block will update to the exact X and Y of that spot. To make the egg glide across the screen, we can use the “glide to X Y” block. We want the egg to glide to a specific position, so we can drag the egg to that spot, and the glide block will update accordingly.

Now, the egg glides once, but we want more eggs to keep coming. We can do that by putting this in a forever loop and making it start when we click the green flag. Gliding across the screen in just one second is a bit fast, so let’s make the egg take three seconds to glide across.

Next, let’s make the game stop if we run into the egg. There’s a block called “stop all” that will stop everything in your project. We can make the egg wait until it touches the chick, and if it does, it will stop the game.

Let’s test that out. If I don’t jump, everything stops. To fix a potential issue where the chick gets stuck in the air when it runs into the egg, we can make the chick go to a starting position when the game starts. I’ll position my chick where I want it to start and use the “go to” block to set that X and Y position when we click the green flag.

Now, to make our game even more fun, let’s add more obstacles. It’s easy to do this: just right-click on the egg and click “duplicate.” Now we have another egg with the same code as the first one, so it will glide just like the first egg does.

However, we can’t see the second egg because it’s on top of the first egg. Let’s make the second egg wait one second before it starts gliding so that they are spaced out. To improve the appearance, we can make it “hide” when the project starts and then “show” once it’s done waiting.

Lastly, let’s add a score so the player earns points every time they jump over an egg. To do this, we’ll create a variable called “score” to keep track of the player’s score. Every time the player successfully completes a jump, we can increase their score by one. When the player loses and the project restarts, we can set their score back to zero.

And there you have it! That’s a jumping game. I hope this tutorial helped you out. There are lots of other things you could try, like adding multiple kinds of obstacles or changing the backdrop when the player reaches a certain score. I can’t wait to see all the things you create. Well, I’ll see you next time, and happy scratching!

This version removes any unnecessary details while maintaining the instructional content.

All Video Lessons

Login your account

Please login your account to get started.

Don't have an account?

Register your account

Please sign up your account to get started.

Already have an account?