Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

SCRATCH PROGRAMMING ch-1

Scratch is a visual programming language designed for creating games, animations, and interactive stories, allowing users to easily communicate with computers through color-coded commands. Developed by Mitchel Resnick at MIT, Scratch simplifies programming by using blocks that fit together like jigsaw pieces, making it accessible for beginners. The document provides instructions on downloading Scratch, creating projects, and using various features like sprites, sounds, and scripts.

Uploaded by

atl.167bniketan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

SCRATCH PROGRAMMING ch-1

Scratch is a visual programming language designed for creating games, animations, and interactive stories, allowing users to easily communicate with computers through color-coded commands. Developed by Mitchel Resnick at MIT, Scratch simplifies programming by using blocks that fit together like jigsaw pieces, making it accessible for beginners. The document provides instructions on downloading Scratch, creating projects, and using various features like sprites, sounds, and scripts.

Uploaded by

atl.167bniketan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

WHAT IS SCRATCH

GETTING STARTED
With SCRATCH FOR Scratch is a visual programming language that is perfect for
CREATING GAMES making games, animations, interactive stories and other visually
ANIMATION rich programs. Scratch can be used to play digital music and
INTERACTIVE STORIES
sound effects
&

MORE.
WHAT IS PROGRAMING LANGUAGE

As we know, to communicate with a person, we need a specific


language, similarly to communicate with computers,
Programmers also need a language is called Programming
language.

A programming language is a computer language that is used


by programmers (developers) to communicate with
computers. It is a set of instructions written in any specific
language(C,C++,Java, Python)toperformaspecific task.

WhyScratch?
 You don’t have to remember or type any commands.
 Error messages are rare.
 The commands are color-coded and categorized,so you
can easily find a command when you need it.
 The commands in Scratch simplify common activities.
Who is developer of Scratch?
Scratcher Jocelyn with Scratch co-creator Mitchel Resnick, who heads the Lifelong Kindergarten group at the
MIT Media Lab, home base of the Scratch team.

MITCHEL RESNICK:SCRATCH CREATOR,PROFESSOR


ISAN EXPERT ON HELPING STUDENT CREATIVITY..

HOW TO DOWNLOAD SCRATCH?


You can download a copy of Scratch from the Scratch website by executing the following steps:
1. Gotohttp://scratch.mit.edu/download and click on the Download Scratch Now!link.
2. The Download Scratch page appears.Fill in the optional form to receive up dates about Scratch.
3. Click on the Continue to Scratch Download button. The webpage shown in Figure 1.1 displays. Click
on the appropriate link for your operating system.

Here it is clearly mentioned either you want to download it for windows operating system or
others. So click on Windows 10+ link here.
CREATING A NEW SCRATCH PROJECT
The first step in creating a new Scratch application is to click on the New button located at the top of the
Scratch IDE. The Scratch IDE is organized into a number of separate components as shown in next page.
For starters, the code block area contains code blocks, organized into different collections.You will uses
elected code blocks to create a script that makes the sprite talk. The main parts of the Scratch IDE,as
shown in the figure below

TABS

BLOCK
PALATTE

STAGE
AREA

SCRIPT
AREA

SPRITE
LIST

ADD NEW
ADD SPRITE
EXTENSION

ADD BACKDROP

Stage Area
This is a place where everything takes place, such as animations, turtle graphics either in a small or
normal size, with a full-screen option also available. It uses X and Y coordinates to monitor action with
0, 0 being the stage center. All the action by a sprite is performed here.

Sprite List-The cat is a “sprite”, which is like a character or object in a game. Your project might include

lots of sprites, such as the player’s spaceship, invading aliens and a missile. Sprite List displays thumbnails

of all the sprites in the current Scratch project . For each sprite, it shows the sprite’s name, how many
scripts it has, and how many costumes it has.

Blocks Palette-In Scratch,you give the computer commands by using blocks, which are instructions that fit together

like jigsaw pieces. The Blocks Palette presents you with all the blocks you can use. When you start Scratch, you can

see the Motion blocks, which are color-coded in dark blue, and are used for moving sprites around the Stage.You can

browse a different set of blocks in the Blocks Palette by clicking one of the buttons, such as the Looks button or the

Sound button.You can also scroll through all the blocks in the different categories in the Blocks Palette.

Script Area/Code Area-The Code Area is where you make your programs, by joining instruction blocks
together.When you join blocks together,the result is called a script.The CodeArea expands to fill
the screen space available,so if you use a larger monitor, the Code Area will be bigger.
Add New Sprite-This option help you in adding new sprite by uploading, paint, and select from
library option.

Add New Backdrop-This option help you in changing background by uploading,paint and select
from library option.
Add Extension-An extension is a category of blocks that can be added to the Block Palatte and
extends the scope of the Scratch Editor. Extensions make it possible to connect Scratch projects
with external hardware such as sources of information on the web (such as Google Translate and
Text to Speech), pen,music,video sensing or blocks allowing for more advanced functionality.

CREATING YOUR FIRST SCRATCH APPLICATION


Scratch application projects are made up of objects called sprites. A sprite is a two-dimensional bitmap image
drawn on a transparent background. Sprites can be moved around and made to interact with one another. Sprites
consist of three primary components, as outlined here:
■ Scripts- Collections of codeblocks that outline the programming logic that controls the operation
of sprites.
■ Costumes- Images that are used to display the sprite on an area of the Scratch IDE, referred to as
the stage. Sprites can consist of any number of costumes.
■ Sounds- Sound effects that are played during application execution whencertain events occur or
as background audio.

In Scratch, any character or object is called a sprite. Every new project in Scratch starts with the Cat sprite.

Want to choose a different sprite?

Click the New Sprite icon.

Want to delete a sprite from your project?

First, select the sprite by clicking thumbnail in the Sprite List. Then,

click here to delete the sprite.


HOW TO MOVE A SPRITE

1.Drag block from Event Option.

1. Drag a MOVE block into the Scripts area.


3. Click on the block to make the cat move.

SCRATCH BLOCKS
The Scratch blocks are arranged into color coded categories:

Motion-It contains the movement of sprites .

Looks-It can change the appearance and costumes of sprites.

Sound-This block help in adding different sound and audio files.

Events:Event blocks are used to control events and helps in triggering scripts.

Control-This block used to control the execution of script using loop ,repeat option.

Sensing-This block helps in interaction between different sprites.

Operators-This block helps in adding mathematical function in project.


Variables-This block helps in displaying data in a project like score,timer etc.

My Blocks-This option will help in creating your own blocks.

=move steps towards current direction.

=turn left by given degrees.

=turn right by given degrees.

=This block help the sprite to move in random position .

=go to any position by giving x and y values,x lies between -240 and 240 and y lies between
-180 and 180.

=move smoothly to any position within N seconds.

=move smoothly to particular position by giving the values of x and y


Coordinates.

=turn to any direction by giving degree(0°=Left,180°=Right,90°=Up,270°=down)

=move the sprite according to mouse pointer

=move left or right by entering number of steps

=move up or down by entering number of steps


=move up or down to a position

=move left or right to a position

=sprite will bounce if it touches the edge on stage

=shows the value of x and y position where the sprite currently is at

=degree of which the sprite is currently facing


HOWTOADDSOUND

1. DragoutaPLAYDRUMandsnapitontotheMOVEblock.

Clickonthisandlistensound

Differentdrumscanbechosenfrompull down.
HOWTODANCEASPRITE

Add another MOVE block. Click inside


the block and type in a minus sign.

Click on any of the


blockstorunthestack.

Add another PLAY DRUM block, then


choosea drum from the menu. Click to run.

HOWTOSAVEAPROJECT
ThisisdonebyclickingontheSavebuttonlocatedatthetop oftheScratchIDE. Inresponse, the Save
Project window displays, allowing you to assign a name to your project and store it on your
computer.
PROJECTS
BASED ON
SCRATCH

PROJECT 1:MAKE THE CAT MOVING TOWARDS THE


BUILDING.

STEPS :

A.SELECT A BACKDROP

1.Click on choose a Backdrop button.

2.Click on choose a Backdrop option.

3.Select Blue Sky from Choose a Backdrop option.


2
1

B.SELECT A SPRITE

1.Drag the Sprite(cat) to the place where you want to start.

2.Select another sprite from choose a sprite option.

3.Type building in search option and select building from sprite library.
1

2
3

4.place the building at the end of stage area.

C.CREATING SCRIPT FOR THE SPRITE

1.First Select cat and click on code.

2.Select from event option.


3.Select from motion block for the starting position of cat.
4.Choose from motion block and give x and y values for
the finishing position.
Project 2:MOVE SPRITE IN DIFFERENT DIRECTION BY
CHANGING COSTUMES

STEPS:
A.MOVE SPRITE IN LEFT DIRECTION

1.Select character from Choose a sprite Option.


2.You can change the costume by Flip Horizontal option in Costumes .
3.You can change the name of costume as LEFT

1
3

SCRIPT FOR MOVING SPRITE IN LEFT DIRECTION

4.Open Code Area and select option from event


block.

5. Choose option from looks block .

6.Select option from motion block.


A.MOVE SPRITE IN RIGHT DIRECTION

1.Select character from Choose a sprite Option.


2.You can change the costume by Flip Horizontal option in Costumes .
3.You can change the name of costume as RIGHT

SCRIPT FOR MOVING SPRITE IN RIGHT DIRECTION

4.Open Code Area and select option from event


block.
5. Choose option from looks block .

6.Select option from motion block.

SCRIPT FOR MOVING SPRITE IN UP DIRECTION


4.Select option from event block.

5. Choose option from looks block .

6.Select option from motion block.

SCRIPT FOR MOVING SPRITE IN DOWN DIRECTION

4.Select option from event block.

5. Choose option from looks block .

6.Select option from motion block.

SAVING A PROJECT

To save your project ,follow these steps:

1.Click on the File menu in the menu bar and select the Save option from
the drop-down list.
2.Choose the location where you want to save your project ant type a
suitable name in the File name box.

3.Click on the Save button.

Opening a Saved Project

To open a saved project ,follow these steps:

1. Click on the File menu in the menu bar and select the Load from
your computer option from the list.

2. Select the location where you saved your project.

3. Select the project and click on the Open button.

1
2

ACTIVITY
TIME
Write Scratch code for touching circle 1 to circle 5 using motion block.
(Note:Add Sound after touching each circle)

You might also like