0% found this document useful (0 votes)
996 views

How To Create A Game Like Chrome Dino Using Scratch

This document provides steps to create a simple game like Chrome Dino using Scratch. It involves setting the initial position of the player sprite and rock sprite, making the player sprite jump with the space bar, moving the rock sprite toward the player, increasing the score as the player jumps, and ending the game when the player touches the rock by displaying a "Game Over" message. The game replicates the basic mechanics of avoiding obstacles by jumping that is seen in the Chrome Dino game.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
996 views

How To Create A Game Like Chrome Dino Using Scratch

This document provides steps to create a simple game like Chrome Dino using Scratch. It involves setting the initial position of the player sprite and rock sprite, making the player sprite jump with the space bar, moving the rock sprite toward the player, increasing the score as the player jumps, and ending the game when the player touches the rock by displaying a "Game Over" message. The game replicates the basic mechanics of avoiding obstacles by jumping that is seen in the Chrome Dino game.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

How to Create a Game like Chrome Dino using Scratch ?

Step 1 : First we will visit www.scratch.edu.mtu and open then website.


We will get the interface like this

Step 2 : Now Click on


Create option to create your
Project.

Step 3 : We will get a


interface after clicking on
create like this :

Step 4 : Choose the


Backdrop by clicking on
the Backdrop option at
the right hand corner and
initialise the position of
the Sprite as Shown :

Pre Defined
Codes STAGE

SPRITE

Coding Area
Step 5 : Choose any Random Backdrop of Your Choice :

Step 6 : At first we will fixed the Position of Sprite ,so that whenever the Flag is clicked
our Sprite will move to the initial position . For that we have to write a Command using
Pre Defined Codes as shown :

For this first


choose the
when clicked
Command from
pre defined
codes,
Secondly, choose
go to x:…. y:… option from the pre defined codes .
Step 7 : Write the Code for the First Sprite as Shown :
Now , after fixing the initial position of the Sprite we will make it jump,
 for this at first we will choose the option when space key pressed from the pre
defined codes .
 Secondly, we will set the y-axis option upto which we want our sprite to jump and
then again we will set the y-axis option to the negative with the same value so that
it again return to its initial position.
Now, if you want that the sprite1 should make the sound when it jumps,
 Choose again the option of when space key pressed from the pre defined codes ,
 Choose the option of play sound until done , the sprite1 will start making sounds
when the space key is pressed .
Now, To increase the Score:
 first we will make a variable name Score
 Choose the option of change variable by 1 from the pre defined codes and change
the variable to score

Step 8 : After all this now we have to move the rock towards the sprite1 so that it can
jump over it :

For this first we will fix the initial position of the rock at the extreme right corner as we
have fixed the position of the sprite1 so
 At first we will choose the when Clicked option from pre defined codes and
then
 Choose go to x : … y : … option
Now to Move the rock towards the Sprite1 we will again
 Choose when Clicked option from pre defined codes and then
 Choose go to x: … y: … option and set the position of x and y axis same as the
value of the sprite1 and
 Choose the option to Glide so that the rock can move towards the sprite1 and
now,
 Place these two command under Forever option from pre defined codes so that
it can repeat until our Sprite1 touches the rock.
Now to over the game we will again :
 Choose when Clicked option from pre defined codes and then
 Choose the option wait until touching variable and change variable to sprite1
and then,
 Choose stop all option from pre defined codes to stop all the activities
All the Steps are Shown Below

Step 9 : To Display Game Over Message :


 First we choose a Same or different Backdrop and write Game Over on it
 Choose when Clicked option from pre defined codes and then
 Choose the option wait until touching variable and change variable to sprite1
and then,
 Choose the Option of Switch Backdrop to and select the backdrop no. you design
for game over , your message will get displayed when the Sprite touches the
rock.

Enjoy The Game !

You might also like