Instructions on how to create a Jumping game in Scratch

Are you looking for a way to create an obstacle course jumping game in Scratch? This article will guide you step-by-step to create a platform jumping game.

Are you looking for a way to create a jumping obstacle course game in Scratch ? This article will guide you step-by-step to create a game where you jump across platforms and overcome obstacles to achieve accomplishments in Scratch.

What is a jumping game?

Have you ever played the Dinosaur Jumping game whenever you experienced internet connection problems or couldn't access a website? It's a very popular jumping game developed by Google in 2014. Now, it's a standard game available in the Google Chrome browser whenever there are internet outages.

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

How to create an obstacle course jumping game using Scratch

Creating a platformer game in Scratch is a fun and engaging way to learn programming. Jumping is a key mechanism in this genre, allowing the character to move from one platform to another.

Here are some important terms to know before you begin, followed by a step-by-step guide to making your Scratch sprites jump.

  • Sprite: A character or object in Scratch that can be programmed to move and interact.
  • Outfit: Different shapes of the same sprite (e.g., oriented to the left versus oriented to the right).
  • Y-position: The vertical position of a sprite (the higher the y-position = the higher it is on the screen).
  • X position : The horizontal position of a sprite (the higher x = the further to the right).
  • Color detection: A Scratch feature that detects when a sprite touches a specific color, used here to detect contact with the ground/platform.

Here are the steps to create an obstacle course jumping game using Scratch:

Step 1: Set up the game environment

Create the ground and base.

  • Draw an image of the ground for your character to stand on.
  • Add images of platforms for your character to jump onto.

Tip: Make sure the color of the top surface of the pedestals exactly matches the color of the ground. If you look at the example below, both the ground and the top surface of the pedestals are light purple.

Position and resize images

  • Arrange the ground, platforms, and character images in the game preview window to build your basic game layout.

Images 1 of Instructions on how to create a Jumping game in Scratch

Step 2: Prepare character images

Add outfits to move in that direction.

The character's image needs to have at least two outfits: Right and Left. This will allow the character to rotate when the arrow keys are pressed.

  1. Draw the character facing to the right side of the screen.
  2. Right-click on the outfit and select Duplicate .
  3. Select all the characters, then click Flip Horizontal to create a version facing left.

Images 2 of Instructions on how to create a Jumping game in Scratch

Step 3: Program character movement

Move to the right and left.

Choose a character image and add the following code:

1. Select the player character image and add the code   "when right arrow key pressed"   to the code area.

2. Attach the code blocks "switch costume to Right" and   "change x" with the value "20" .

3. Right-click and select "Duplicate" the code block, then change the key to the left arrow.

4. Change the outfit to "Left" and the value of "x" to "-20" .

Images 3 of Instructions on how to create a Jumping game in Scratch

Step 4: Program the jumping mechanism

Jump up

In Scratch, jumping is achieved by changing the character's y-position. First, add the command "when up arrow key pressed" to the code area. Then, attach the "repeat"  block set to "15" , and place the command "change y" to "10" inside it.

Falling

When you jump in real life, gravity naturally pulls you back to the ground. In Scratch, you need to program this manually.

  1. Attach the "repeat until <>" block below the previous repeat block.
  2. Click on the "color" variable and then select the dropper tool from the "color" menu .
  3. Hover your mouse over the "Ground" color and then click to select it.
  4. Inside the "repeat until" block , add the command "change y" with "-10" .

Images 4 of Instructions on how to create a Jumping game in Scratch

TIP: If there's a platform directly above your character, you might get stuck on the first jump. This happens because the top of your character is technically touching the background, and so it thinks there's no need to fall! Here's how to fix it:

In the "repeat 15" block , place the "if <> then" block below the "change y" block. Then, add color to the "if" brackets and choose the background color of the base, and then inside the "if" block , add "change y" equal to "-10" .

That's it! The Jumping game is now complete on Scratch.

Close
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup