How to Create Jumping Game in Scratch – 7 simple steps

Amit Dhanwani on March 4, 2024

how to create jumping game in scratch

Learn to create your own jumping game like the Google Dinosaur game with scratch programming. Design characters, code jumps, and add obstacles. Read this guide and get a scratch coding class for free!

Scratch Programming for Kids: Claim your free trial lesson now!

Introduction

 

Are you new to Scratch programming or are you a pro game coder? Do you know how to create jumping game in Scratch coding or make your characters jump through platforms, obstacles, and surprises? If not, then do not worry because this article will guide you through all the steps to create a jumping game in Scratch!

With Scratch programming, you can create your games and animations and even customize already existing games!

This guide will give you all the steps and tricks to make your characters jump through anything just by the click of a button! So, let’s JUMP into the article!

What is a Jumping Game?

 

Have you ever played the Dinosaur game anytime you had an internet connectivity issue or your web page was unreachable?

scratch programming jumping game

This game is a very famous jumping game developed by Google back in 2014. Now, it’s a standard game available in Google Chrome browser whenever there’s some kind of internet issue.

Essentially, a jumping game is a type of video game where you control any character by performing jumping actions. The main objective is usually to navigate through a series of platforms, obstacles, and challenges by timing jumps and avoiding hazards.

You must have played many jumping games or other video games that have a jumping-character element to it. Sonic Games, or Super Mario Bros games, have a lot of jumping components.

Time to create your own jumping game!

Scratch Programming

 

Scratch programming is a visual programming language and an online community developed by the MIT Media Lab. It is designed to teach coding concepts to beginners, especially kids, in a fun and interactive way.

scratch coding for kids

Scratch programming provides a graphical interface where users can drag and drop blocks of code to create animations, games, stories, and interactive projects. You can book a free scratch coding class to try it for yourself.

How to Create Jumping Game in Scratch

 

To create this iconic game, we’ll use the Scratch coding editor. Before we jump into creating, let’s plan our game.

Think about what kind of game you want to make. Think about the main character.

Do you want to add obstacles or multiple platforms?

Do you want to add a scoring system?

What do you want the backdrop to be?

Decide on the main theme and elements you want to include in your game. This tutorial will guide you to create a simple Dinosaur-inspired game.

 

Step 1: Backdrop

 

Every great game needs a fantastic background. In Scratch, we can use the Stage as our canvas.

Click on the “Stage” icon at the top to open the Stage editor. Choose a backdrop that matches your project’s theme. It could be a starry night, a beautiful landscape, or anything related to your idea!

scratch coding for kids

As we are going with the dinosaur theme, let’s add a Jurassic-inspired backdrop!

scratch programming

 

Step 2: Adding characters

 

Now, let’s bring the main jumping character into our game! You can create your sprites (characters) from scratch or choose from Scratch’s vast library of sprites.

Go to the “Choose a Sprite” button and click on “Choose a Sprite”. Select any type of dinosaur you want!

scratch programming sprite

Now, this is what my console will look like:

scratch coding for kids

 

Step 3: Jumping Code

 

Now, this is where the magic happens. We want the character to jump up and down whenever we press the “spacebar” key.

To apply this jumping effect on your Sprite, make the following code block:

scratch programming for kids

When you click on the “Green Flag” and press the space bar, you will see that the character jumps up and down.

The second code block is just to fix a starting position for your character.

We are done with one part of the logic. The other half is to add some obstacles in the game so that we can jump and escape it.

 

Step 4: Adding Obstacles

 

You can choose anything as an obstacle. It depends on the theme of your game. We have assumed that our dinosaur has to jump over a bunch of hatchlings/eggs.

Just like you added the dinosaur to your project, you can add a hatchling, too. It is available in the Scratch Library.

coding for kids

The next step is to make the multiple obstacles in the game!

 

Step 5: Obstacle Code

 

You’ve worked hard on your game so far! Congratulations!

Now, let’s code some more. Click on the Hatchling sprite and add this code block.

scratch programming for kids

If you play the game now, you can see that the hatchling/egg moves across the screen, and you can easily jump over it.

 

Step 6: Obstacle Collision

 

Now, if the dinosaur crashes into the egg, the player loses, and you need to end the game.

Add this code to detect collision between the character and the obstacle.

coding program for kids

Now, if you want to display a new Game Over screen, then you can select a blank backdrop and type the text: “Game Over

coding program for kids

We just want this “Game Over” backdrop to show up when the players lose the game. To achieve this, add this code block:

coding for kids

 

Step 7: Score Card

 

Time to add a scoring system to your game.

Let’s make a new variable “score:”

coding program for kids

Now, we want the score to increase by one whenever the dinosaur jumps over the egg successfully.

Make the following changes in the code block of Dinosaur:

programming for kids

 

Step 8: Time to Play

 

Yay! You have just made your Jumping Game, and now you can enjoy it to the fullest! Make sure to challenge your friends and family members to play this game that you just created!

Conclusion:

 

Congrats! You’ve learned how to make the famous google-dinosaur game! But we did add a little twist to our game, and you might have implemented this jumping logic to any other game theme.

Remember, have fun experimenting, be bold with your ideas, and let your creativity soar as you create more and more magical games for your fantastic Scratch projects!

You can further customize this game by adding sound effects, more obstacles and multiple levels.

Scratch programming is a powerful tool that allows you to unleash your creativity and learn the basics of coding in a fun and engaging way. Begin your journey in scratch programming with Codingal’s free scratch coding trial class and explore Codingal’s scratch programming course for kids, where you can unlock your full potential and learn something new at every step.

Sign up to our newsletter

Get the latest blogs, articles, and updates delivered straight to your inbox.

Share with your friends

Try a free class