Dodge the Ball Game | Scratch Game Codes

About Dodge the Ball Game:

The aim of the Dodge the Ball Game is to control the Giga and dodge the ball coming his way for as long as possible. Basically this is a game of survival and the challenge essentially is to stay in the game for as long as possible.

Dodge the Ball Game Scratch 3.0 Tutorial

Time needed: 1 hour.

Step by step Dodge the Ball Game Tutorial

  1. Moving sprites around the Stage

  2. Falling Ball Continuously

  3. Add Score to the game

  4. Add lives to the Game

  5. Add Game Over Screen

1: Moving sprites around the Stage

Add code blocks to your character sprite Giga so that the player can use the arrow keys to move the character around.

When the player presses the right arrow, the character should point right, move a few steps, and change to the next costume.

When the player presses the right arrow, the character should point right, move a few steps, and change to the next costume.

2: Falling Ball Continuously

In Scratch, choose a new sprite to fall. In this project we used ball. Make your sprite start from a random spot at the top. Then, make it fall down repeatedly.

3: Add Score to the game

Let’s make things more interesting by keeping score.

  • To keep the player’s score, you’ll need to create a variable. Click the bright orange Data category in the blocks palette and then click Make a Variable.
  • Type score as the name of the variable, make sure that it is available for all sprites, and click OK to create it.
  • You’ll also see the score in the top-left of the stage.
  • When a new game is started (by clicking the flag), you should set the player’s score to 0. Add this code to the Stage in order to set the score at the start of the game.
  • Whenever a ball touches ground, you need to add 1 to the player’s score. Add this code to your Giga sprite.

4: Add lives to the Game

  • Make game even more interesting by adding lives to the game.
  • Create one more variable, name it lives, make sure that it is available for all sprites, and click OK to create it.
  • when a green flag clicked, set the lives to 3. The number of lives, the game should start with.
  • When Giga touches the ball, the lives should decrease by 1.
  • To make game even more exciting, You can also add sound effects for loosing lives.

5: Add Game Over Screen

End the game when Giga runs out of lives. This happens when lives=0.

Create a new background, name it Game Over screen

DODGE THE BALL GAME SCRATCH CODE

Scratch 3.0 Game Tutorial

Download Project Files

You can download the project files of Dodge the Ball Game here and find the other interesting scratch 3.0 Tutorial of Animate your name and Tic Tac Toe Scratch Game here.

scrat

View Comments

  • I've been surfing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. Personally, if all site owners and bloggers made good content as you did, the web will be much more useful than ever before.

Recent Posts

Create Your Own Super Mario Game in Scratch (Easy Step-by-Step)

Here's a step-by-step tutorial to create a platformer game similar to Super Mario in Scratch:…

1 week ago

Create a Fun Whack-a-Mole Game in Scratch: Step-by-Step Tutorial

Here's a step-by-step tutorial to create a Whack-a-Mole game in Scratch with code snippets: 1.…

1 week ago

Spot The Difference Game in Scratch

About Game: In Spot The Difference Game, the player has to spot the difference between…

3 years ago

Memory game using Scratch| Step by step Scratch Tutorial

In this scratch tutorial, you will create a memory game in which you have to…

3 years ago

How to make Flappy Bird on Scratch | Coding For Kids

In this article, we are going to teach you how to program your owncustomized version…

3 years ago

How to make Shooting Game on Scratch (Duck Hunt Game)

About Duck Hunt Game: This is a remake of the classic video game Duck Hunt.…

3 years ago

This website uses cookies.