KEMBAR78
Scratch programming introduction to game creation | PPTX
SCRATCH
PROGRAMMING-
INTRODUCTION TO
GAME CREATION
Prepared by: Mrs Ankita a shirke
• Scratch is a programming language designed for a children to enhance their
computing skill.
It enables the children to create their own game, animated stories and
projects.
Scratch is a simple environment designed by the Kindergarden Lifelong
Learning Group at MIT to introduce some basic programming concepts in a
fun and interactive manner.
Feature of Scratch:
1. Scratch is available free of cost.
2. It is easy to understand and learn.
3. It increases the student’s interest in programming by providing
graphical environment.
4. instead of writing text or codes, predefined blocks are snapped together
to create the script.
5.It allows playful experimenting with program segments.
Component of Scratch
Sprite:
Sprites are objects that perform
various action in a scratch project.
Scratch provides a number of in-built
sprits.
By default the ‘cat’ sprite is selected
and displayed in the middle of the
stage.
Lets learn about various components of the scratch window:
Stage :
It is the main working area to draw
pictures or perform actions.
It is 480 pixel wide and 360 pixels
high
It divided into (X,Y) co-ordinates ,
which shows the position of mouse
Sprite List: The sprite list gives the 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: The block palette is an area of
the Scratch User Interface located to the left of the Code Area.
The blocks are located to the right of the block categories,
which can be clicked to automatically scroll to that category.
Script Area: The area on the right side of the project editor
where scripts are assembled is called script area. Blocks from
the block palette are dragged into the script area so the script
area displays a stack of blocks connected to each other. Sprite
List: It displays thumbnail for all sprites in a project.
Script Info Pane: This icon present on the top left corner of
the sprite Thumbnail to display the Sprite Info Pane. It includes
information about the selected sprite.
Tabs: Scratch provides three tabs to write a script for the
sprite and add various effects to it.
1. Scripts
2. Costumes
3. Sounds
Stage Icon: The Stage is the term for the background of the
project. This icon present at the left of the sprite list.
Cursor Tools: There are various cursor tools in the Scratch
interface are as follows:
1. Duplicate: The duplicate button present in the Scratch
interface used to duplicates anything on the screen space. It
duplicates everything including the sprites, scripts, blocks, etc.
2. Delete: The delete button used to deletes anything on the
screen. It can delete everything including sprites costume
selections, sounds, blocks, and scripts, etc. We can recover the
deleted item through the revert option.
3. Grow/Enlarge: Through this option, we can enlarge any
images/sprint in the stage area.
4. Shrink: Through this option, we can shrink any
images/sprint in the stage area.
Types of blocks in scratch:
Blocks are puzzle-piece shapes that are used to create code
in scratch. The blocks connect to each other vertically like a jigsaw
puzzle, where each data type (Hat, Stack, Boolean, Reporter, C
and Cap.) has its own shape, and a specially shaped slot for it to
be inserted into, which prevents syntax errors. Series of
connected blocks are called scripts.
There are six different block shapes: Hat, Stack, Boolean, Reporter, C and
Cap.
Hat blocks
are the blocks that start every script. They are shaped with a rounded top
and a bump at the bottom — this is so you can only place blocks below
them. There are 11 Hat blocks in the Scratch editor, six of which are in
the Events category, one in the Control category, and one in the
category My Blocks
Stack blocks
are the blocks that perform the main commands. They are shaped with a
notch at the top and a bump on the bottom — this is so blocks can be
placed above and below them. There are 77 Stack blocks — the most
Boolean Blocks:
A Boolean block is an elongated hexagonal block that
reports boolean values. When the block is used, it acts as a
reporter block, reporting "true" or "false" string values or the
numbers "1" and "0" depending on their usage in a script.
Reporter block :
A block that reports a value. These can be anything, from
numbers to strings. Reporter blocks cannot be placed directly
above or below another block.
C Blocks:
A C block is a block that is shaped like a "C", so other blocks can fit
inside it. These blocks perform the conditions and loops.
Cap blocks:
Cap blocks are the blocks that end scripts. They are shaped with a
notch at the top and a flat bottom .
Changing the backdrop of the stage
 The background for the sprite is called Stage OR backdrop.
 The New backdrop icons are used to change background of
stage.
 We can choose backdrop from library.
 OR Paint new back drop.
 OR Upload Backdrop from file.
 OR New backdrop from camera.
Using motion blocks: Motion blocks is one of the ten categories
of Scratch blocks. They are color-coded medium-blue and are used to
control a sprite's movement. They are available only for sprites. There
are currently 18 Motion blocks
The Looks Blocks: Looks blocks are color-coded purple and
are used to control a sprite’s appearance.
Working with multiple sprites:
Each sprite has its own scripting area, where the scripts are written
particularly for that sprite. This image shows how two or more sprites can
communicate.
Pen Block:
pen block is used to make drawing games,
some types of platforms and many other
things. Some ways to use it are very
advanced, but the simplest you can get is a
drawing game. Basically, it's like you're
drawing on a canvas and you can press
space to erase.
Making a duplicate copy of sprite
 Stamp block is used to create duplicate copy of sprite.
Sound Block: Sound Blocks are one of the ten
categories of Scratch blocks. They are color-coded
pink/magenta, and are used to control sound (and
formerly MIDI) functions. There are currently 9 Sound
blocks:
Scratch programming  introduction to game creation

Scratch programming introduction to game creation

  • 1.
  • 2.
    • Scratch isa programming language designed for a children to enhance their computing skill. It enables the children to create their own game, animated stories and projects. Scratch is a simple environment designed by the Kindergarden Lifelong Learning Group at MIT to introduce some basic programming concepts in a fun and interactive manner.
  • 3.
    Feature of Scratch: 1.Scratch is available free of cost. 2. It is easy to understand and learn. 3. It increases the student’s interest in programming by providing graphical environment. 4. instead of writing text or codes, predefined blocks are snapped together to create the script. 5.It allows playful experimenting with program segments.
  • 4.
  • 5.
    Sprite: Sprites are objectsthat perform various action in a scratch project. Scratch provides a number of in-built sprits. By default the ‘cat’ sprite is selected and displayed in the middle of the stage. Lets learn about various components of the scratch window:
  • 6.
    Stage : It isthe main working area to draw pictures or perform actions. It is 480 pixel wide and 360 pixels high It divided into (X,Y) co-ordinates , which shows the position of mouse
  • 7.
    Sprite List: Thesprite list gives the 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: The block palette is an area of the Scratch User Interface located to the left of the Code Area. The blocks are located to the right of the block categories, which can be clicked to automatically scroll to that category. Script Area: The area on the right side of the project editor where scripts are assembled is called script area. Blocks from the block palette are dragged into the script area so the script area displays a stack of blocks connected to each other. Sprite List: It displays thumbnail for all sprites in a project.
  • 8.
    Script Info Pane:This icon present on the top left corner of the sprite Thumbnail to display the Sprite Info Pane. It includes information about the selected sprite. Tabs: Scratch provides three tabs to write a script for the sprite and add various effects to it. 1. Scripts 2. Costumes 3. Sounds Stage Icon: The Stage is the term for the background of the project. This icon present at the left of the sprite list.
  • 9.
    Cursor Tools: Thereare various cursor tools in the Scratch interface are as follows: 1. Duplicate: The duplicate button present in the Scratch interface used to duplicates anything on the screen space. It duplicates everything including the sprites, scripts, blocks, etc. 2. Delete: The delete button used to deletes anything on the screen. It can delete everything including sprites costume selections, sounds, blocks, and scripts, etc. We can recover the deleted item through the revert option. 3. Grow/Enlarge: Through this option, we can enlarge any images/sprint in the stage area. 4. Shrink: Through this option, we can shrink any images/sprint in the stage area.
  • 10.
    Types of blocksin scratch: Blocks are puzzle-piece shapes that are used to create code in scratch. The blocks connect to each other vertically like a jigsaw puzzle, where each data type (Hat, Stack, Boolean, Reporter, C and Cap.) has its own shape, and a specially shaped slot for it to be inserted into, which prevents syntax errors. Series of connected blocks are called scripts.
  • 11.
    There are sixdifferent block shapes: Hat, Stack, Boolean, Reporter, C and Cap. Hat blocks are the blocks that start every script. They are shaped with a rounded top and a bump at the bottom — this is so you can only place blocks below them. There are 11 Hat blocks in the Scratch editor, six of which are in the Events category, one in the Control category, and one in the category My Blocks Stack blocks are the blocks that perform the main commands. They are shaped with a notch at the top and a bump on the bottom — this is so blocks can be placed above and below them. There are 77 Stack blocks — the most
  • 12.
    Boolean Blocks: A Booleanblock is an elongated hexagonal block that reports boolean values. When the block is used, it acts as a reporter block, reporting "true" or "false" string values or the numbers "1" and "0" depending on their usage in a script. Reporter block : A block that reports a value. These can be anything, from numbers to strings. Reporter blocks cannot be placed directly above or below another block.
  • 13.
    C Blocks: A Cblock is a block that is shaped like a "C", so other blocks can fit inside it. These blocks perform the conditions and loops. Cap blocks: Cap blocks are the blocks that end scripts. They are shaped with a notch at the top and a flat bottom .
  • 14.
    Changing the backdropof the stage  The background for the sprite is called Stage OR backdrop.  The New backdrop icons are used to change background of stage.  We can choose backdrop from library.  OR Paint new back drop.  OR Upload Backdrop from file.  OR New backdrop from camera.
  • 15.
    Using motion blocks:Motion blocks is one of the ten categories of Scratch blocks. They are color-coded medium-blue and are used to control a sprite's movement. They are available only for sprites. There are currently 18 Motion blocks
  • 16.
    The Looks Blocks:Looks blocks are color-coded purple and are used to control a sprite’s appearance.
  • 17.
    Working with multiplesprites: Each sprite has its own scripting area, where the scripts are written particularly for that sprite. This image shows how two or more sprites can communicate.
  • 18.
    Pen Block: pen blockis used to make drawing games, some types of platforms and many other things. Some ways to use it are very advanced, but the simplest you can get is a drawing game. Basically, it's like you're drawing on a canvas and you can press space to erase.
  • 19.
    Making a duplicatecopy of sprite  Stamp block is used to create duplicate copy of sprite.
  • 20.
    Sound Block: SoundBlocks are one of the ten categories of Scratch blocks. They are color-coded pink/magenta, and are used to control sound (and formerly MIDI) functions. There are currently 9 Sound blocks: