How to make a Snake Game on Scratch (step by step SCRATCH Tutorial 2021)

In this Tutorial, we attempt to make the popular snake game on Scratch

About Snake Game:

The player controls a snake, whose main goal is to eat apple appearing at random position on the screen. The more Apple snake eats, the longer it gets, and the harder it becomes to keep the snake from crushing its own tail. If that happens, Game will be over.

For this game we need 2 sprites.

  1. Apple: The snake will try to eat this.
  2. Snake: This is what player control.

Sketchout the Snake Game:

Lets sketch out the snake game.

  1. Make the Snake Controlled by Arrow Key
  2. Make Apple appear at random position
  3. The snake eats the apple and grows
  4. Make the Snake Teleport
  5. Add score to the game
  6. Add Game over Screen

Snake Game Scratch Code

Snake Game On Scratch

Make the Snake Controlled by Arrow Key

Make sure the snake moves continuously. Using Forever loop achieve constant movement. This is easy to code, when green flag clicked the snake will automatically move 20 steps.

The player uses the arrow keys to control the direction of the snake movement. As the snake is moving on its own, we can change the direction of the snake, by using ‘point in direction’ block from “Motion”.

Make Apple appear at random position

At a random spot, an apple is introduced into the game. This is easy to program. this need only 2 things.

Program your apple sprite so that, if snake touches it, it will hide and go to the random position and appear again.

The snake eats the apple and grows

Program your sprite so that, it should keep track of the points, and the snake must grow in size after eating.

This is perhaps the most complicated to understand.

You can build a clone or multiple clones in no time. The clone was continuously produced every 0.2 seconds. When it start as clone switch costume to body not the head.

Make sure switch the costume to the head at the beginning of the game to resolve the costume problem.

The snake eats an apple and raises its score by 1. yes. there ought to be a clone linked to the snake every time the player gets the point.

The waiting peiod before removing additional clones is same as Total clones multiplied by the speed. Or we can say Speed x score.

Make the Snake Teleport

Make the game more interesting, by letting the snake to teleport. i.e, Snake come from the opposite direction, when it hits the edge of the board. This will make the game more smoother.

Add score to the game

What happens if the snake eats apple?

Every time the snake eats a apple, the score increase by 1.

Add Game over Screen

Game will be over if it touches its own tail. When this happen we need to broadcast a game over message, so that other sprite can act accordingly.

Downlod Snake game On Scratch Project Files:

To download the project files of How to make Snake Game on Scratch Click here. Also go through the another interesting scratch 3.0 project of Frogger Game on Scratch here.

scrat

View Comments

  • Wow that was strange. I just wrote an incredibly long comment but after I clicked submit my comment didn't appear. Grrrr... well I'm not writing all that over again. Anyways, just wanted to say great blog!

  • I'm extremely impressed with your writing skills as well as with the layout on your
    blog. Is this a paid theme or did you customize it
    yourself? Anyway keep up the nice quality writing, it is rare to see a great blog like this one today.

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:…

2 months 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.…

2 months 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.