100% found this document useful (1 vote)
665 views21 pages

Rock Blaster

The document provides instructions for creating a rock blaster game in Scratch. It includes 3 main sections: [1] Setting up Scratch and creating a new project, [2] Designing the game sprites and backdrop, and [3] Coding the game logic and sprite behaviors. Key steps include choosing rock, rocket, and button sprites; setting score and speed variables; coding sprite movement and collisions; and using cloning and broadcasting for laser beams and the "game over" message. The goal is to code sprite behaviors like movement and collisions to match the logic of blasting rocks with a spaceship.

Uploaded by

purbita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
665 views21 pages

Rock Blaster

The document provides instructions for creating a rock blaster game in Scratch. It includes 3 main sections: [1] Setting up Scratch and creating a new project, [2] Designing the game sprites and backdrop, and [3] Coding the game logic and sprite behaviors. Key steps include choosing rock, rocket, and button sprites; setting score and speed variables; coding sprite movement and collisions; and using cloning and broadcasting for laser beams and the "game over" message. The goal is to code sprite behaviors like movement and collisions to match the logic of blasting rocks with a spaceship.

Uploaded by

purbita
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

ROCK BLASTER

USING SCRATCH
By BuddyCodz
What’s the game about?

As the player, you’ll have to move a spaceship,


up and down using the arrow keys, to blast
rocks that will be coming towards you.

Sounds fun!
COncePTs we’Ll bE lEaRNinG

1. Hide and show


2. ‘Repeat until’ loop
3. When key pressed
4. Touch sprite
5. Broadcast message
01
Setting up
Opening Scratch and creating a new
project

03
02
Coding
Understanding the commands and
the logic of the game.

Designing the game


Choosing/creating the visual
components of the game
01.

Setting up
Opening the website
Signing in
Creating a new project
Opening the website

Type

scratch.mit.edu
in the search bar
and press <ENTER>
Signing in
Click on Sign in at the top left corner of the page.

Type in your Username and Password.

Click on the Sign in button.


Creating a new project
Click on Create at the top, right part of the page.

Once the project window opens


click on File and then New.
02.

Designing
Choosing the sprites
Painting a sprite
Choosing the backdrop
Choosing the sprites

Delete the default Cat Sprite by clicking on the Cross icon

Hover over the Choose a Sprite button and click on the


Search icon.
Type rock into the search-bar and select the Rocks sprite.
Repeat this for the rest of the sprites by typing rocketship
and button into the search-bar.

Create your own “GAME OVER” sprite by clicking on


Paint instead of Search.
Painting a Text
sprite Select the Text icon

Formatting
Choose a colour from the Fill option and a
font style. Here, we’ve chosen Pixel.

Insert words
Click on the checkered space and type
Game Over. Enlarge as needed.
Choosing the backdrop

Hover over the Backdrop button and click on the Search icon.

Type Space into the search-bar and select a backdrop of your


choice.
This is what your
design space
should look like.
3. Coding
What we’ll do

Understand the Learn Creat codes for


logic commands Sprites

Figure out how each Find out what the Use code blocks to
component of the purposes of all the make the sprites
game should behave codes are and use move, appear, stop
and create necessary them in the correct etc. according to the
variables. sequence game’s needs.
Creating Variables

SCORE and SPEED are the two variables needed.

Click on Variables from the panel Make a variable Type


new variable name OK.
For the rocketship sprite
When FLAG is clicked (program is started), our initial score
should be 0.

The size and starting position of the rocketship must also


be specified.

The way the sprite will move is then described through


the coding, placed under the Repeat Until loop.

The Repeat Until loop will terminate movement when a


certain condition (here, the rocks touching the rocketship)
is made true.
For the button sprite
The button sprite is used to create the laser beams,
hitting the rocks.

The size and starting position of the sprite must


also be specified. However, the laser will only
appear after the spacebar is hit.

Since the laser beams will be used multiple times


i.e. every time the spacebar is hit cloning of the
sprite is done.

The Repeat Until loop ensures that the beam


keeps moving ahead till it reaches the opposite
edge.
The coding for the Rock sprites and the
Game Over sprite was explained in class.
Thank you :)
Contact us at
[email protected]
+91 8218122412
+91 7409356759

You might also like