Coding For Kid Scratch The Ultimate Guide To Creating Interactive
Coding For Kid Scratch The Ultimate Guide To Creating Interactive
Baz Binder
© Copyright 2020 by (Baz Binder)- All rights reserved.
This document is geared towards providing exact and reliable information
regarding the topic and issue covered. The publication is sold with the idea
that the publisher is not required to render accounting, officially permitted,
or otherwise qualified services. If advice is necessary, legal or professional,
a practiced individual in the profession should be ordered.
From a Declaration of Principles which was accepted and approved equally
by a Committee of the American Bar Association and a Committee of
Publishers and Associations.
In no way is it legal to reproduce, duplicate, or transmit any part of this
document in either electronic means or printed format. Recording of this
publication is strictly prohibited, and any storage of this document is not
allowed unless with written permission from the publisher. All rights
reserved.
The information provided herein is stated to be truthful and consistent, in
that any liability, in terms of inattention or otherwise, by any usage or abuse
of any policies, processes, or directions contained within is the
solitary and utter responsibility of the recipient reader. Under no
circumstances will any legal responsibility or blame be held against the
publisher for reparation, damages, or monetary loss due to the information
herein, either directly or indirectly.
Respective authors own all copyrights not held by the publisher.
The information herein is offered for informational purposes solely and is
universal as so. The presentation of the information is without a contract or
any type of guarantee assurance.
The trademarks used are without any consent, and the publication of the
trademark is without permission or backing by the trademark owner. All
trademarks and brands within this book are for clarifying purposes only and
are owned by the keepers themselves, not affiliated with this document.
Table of Contents
Introduction
Conclusion
Introduction
Young people are now commonly referred to as “digital natives” since
they're fluent in digital technologies. Certainly, many young people send
text messages, play online games, and browse the web very comfortably.
But does it make them proficient with emerging technologies? Although
they constantly deal with digital media, very few can make their
animations, simulations, or games. It’s like they are able to “read” but not
“write.”
In my opinion, digital fluency requires the ability to chat, browse, and
communicate and the ability to design, create, and invent new media. For
this to happen, one needs to learn a certain programming language and
develop a program. Programming offers important advantages; for instance,
it significantly increases the range of what you can create with the computer
and in what way you can express yourself. It also enhances your range of
learning.
The question is, what do children learn while creating games, animations,
interactive stories, music, and art through Scratch?
First of all, they learn computational and mathematical concepts that form
the core of the Scratch experience. While creating programs in Scratch, the
students gain an understanding of iteration and conditionals, which are the
essential concepts of computation. They also learn the key mathematical
concepts such as variables, coordinates, and random numbers.
These concepts are effectively learned by students in a practical and
inspiring context. In formal algebra classes, students usually feel little
personal attachment with the concept when they learn about variables.
Whereas when they learn about the variables in Scratch, they can use
variables in very meaningful ways
quickly, to regulate the animation speed, or to keep track of the scoring in
the game they design.
The students also learn about the process of designing when working on
Scratch projects. A student usually starts with an idea, creates a prototype,
plays with it, debugs it when things are going wrong, gets guidance from
other people, then improves it, and redesigns it. It's a continuous vortex: get
an idea, create a project that leads to new ideas, new projects, and so on.
Chapter 1 – Getting Started with Scratch
Scratch is a modern programming language that appeals to students or
individuals who have never thought of becoming programmers before or
who are new to programming. It is based on a language called Smalltalk,
another programming language. The Scratch project started in 2003 and
was developed and written at the Media Lab of the Massachusetts Institute
of Technology (MIT) by the Lifelong Kindergarten group, and the Scratch
software and website was officially publicly released in 2007.
1.1 Goal
The main goal of the developers in designing the language was to make the
language and programming environment simple, straightforward, and
conveniently learnable by children who had no prior experience with
programming. There is a great correlation between Scratch’s powerful
multimedia features and multithreaded scripting style and somewhat limited
range of the programming language.
The name Scratch comes from the music term “Scratching”. Using old
records on a turntable of a record player, DJs scratch fresh rhythmic tones
for the creation of new remixes and songs. Since all the Scratch projects are
freely accessible for use and amendment, one can easily create new projects
by using portions of programs developed by the other Scratchers. There are
programmers of all ages in the Scratch online community who can tag,
comment, share, remix, and download the programs that they create and
upload to the website.
1.4 Users
Scratch is accessible in over 40 languages and is used in more than 150
different countries. It is being used in various environments, including
homes, libraries, schools, community centers, and museums, etc. The
programming has been made fun and easy to learn for anyone wanting to
learn, irrespective of their ages, backgrounds, and interests, to program and
create their own animations, interactive stories, games, and simulations.
And then, they can share their creations with anyone in the online
community.
There are more than 600,000 registered members of the Scratch community,
and above 5,400,000 projects have been shared online. To download the
projects or view and use its programs that others have uploaded online, one
should not necessarily have to register.
1.5 ScratchJr
ScratchJr (https://www.scratchjr.org/), a simplified version of Scratch,
developed for younger kids ages 5 to 7, to explore. ScratchJr is formed on
Scratch, and that uses visual-centric tools to familiarize little children with
the programming world. It was originally created by some Scratch Team
members, and it is available as a mobile app on both iOS and Android.
1.6 ScratchEd
In May 2009, the ScratchEd (https://scratched.gse.harvard.edu/) site was
created for educators and teachers where they had access to colleagues,
common goals, and resources as learners themselves. But it was converted
to a static archive, later in 2019, in response to changing technologies and
needs. Although joining ScratchEd and contributing materials is no longer
feasible, the 10 years of ScratchEd content is still available for you to
explore. There are now other ways to support educators that are working
with Scratch, such as the Creative Computing Curriculum and Scratch
Educator Meetups.
1.7 Importance
Scratch is now commonly and widely used as a means of teaching basic
computer programming to kids in schools around the world. It is being used
outside of schools as well. Even some teachers use Teacher Accounts to
monitor students in the Scratch Community while they are having fun. With
Scratch, children and as well as adults gain an understanding of the basics
of programming and then often move on to other programming languages
when their interest is developed. While using Scratch, people not only can
create and remix the projects, but they can also collaborate with other
Scratchers on various Scratch projects.Scratch helps the children develop
creative thinking, systematic reasoning, and cooperative learning, which are
important skills for living in the 21st century. In today’s society, the
capability of coding computer programs is an essential part of literacy.
While learning to code in Scratch, people also learn vital strategies and
tactics of problem-solving, project designing, and ideas communication.
From elementary school to college and across disciplines, such as computer
science, math, social studies, and language arts, students are learning with
Scratch at all levels. Certainly, the primary objective is not to train people
as skilled programmers for jobs but to cultivate a new generation of
innovative, systemic thinkers who use programming to communicate their
ideas comfortably.
In the corner of the project, you’ll find the "See Inside" button;
click it.
Modify the project in order to personalize it.
Next, click the orange-colored remix button present in the top-
middle,
Now the new user owns the edited project.
Make visible modifications to your project. You are accused of stealing or
plagiarizing the original user's project if there are no significant
improvements, and the project may be reported by any other scratcher.
Remixing is an imperative part of the Scratch community. You can still
create projects on the Scratch website, even if you don’t want anyone to see
or remix them. All you must do is not to share them on the website.
1.9 Accounts
You can view other Scratcher’s projects, read their comments and forum
posts, and even create your own projects on Scratch without an account.
But an account is needed for writing comments and forum posts, saving and
sharing projects, and participating in other social activities in the
community, for example, for "loving" other Scratcher’s projects.
You can Sign in from the Scratch homepage if you already have an account.
For creating an account, you just have to click "Join" on the Scratch home
page. You will need to answer a few questions and give an email address.
Joining just takes a couple of minutes, and it is totally free. You will receive
an email with a hyperlink after creating a new account on Scratch. For
confirmation of your account, just click on the link. You will be able to
write comments, save and share projects, and create studios once you are
done confirming your account.
1.12 Project
The creation made in the Scratch Program is called a ‘project’. Projects can
be animations, games, simulations, pieces of art or music, or anything else
possible, which is created with the Scratch software. Although the projects
typically fall into one of six key genres, most often, they are games and
animations. There are more than 50 million projects shared on the
Scratch Website till March 2020.The project-designing is a process that
combines many of the 21st-century learning skills, which are important to
be successful in the future: creative thinking, clear communication,
systematic analysis, effective collaboration, iterative design, and constant
learning.
Project development with Scratch helps the students build a deeper level of
digital technology fluency. What is meant by fluency? You must learn not
only how to read but also how to write to be considered fluent in English,
German, or other languages, so you are able to express yourself in that
language. Likewise, you should not only learn how to interact with the
computer, but you should also know how to create it to be fluent with
digital technology. Of course, most students, just like most will not become
professional authors, will not grow up to become professional
programmers. But programming learning provides advantages for everyone:
it encourages students to express themselves more thoroughly and
creatively, helps them grow as critical thinkers, and helps them to
understand the workings of emerging technology they experience
everywhere in their daily lives.
Chapter 2 – Scratch Contents
Scratch is a block-based programming language targeted at children that
allows them to create their own interactive animations, stories, and games
and then share their projects on the internet. It enables kids to the program
by simply stacking the programming code blocks on one another. It is an
active, event-driven, object-oriented, and language.
You would need to understand its basic language and environment prior to
actually begin programming on Scratch. The pieces and parts that create a
program in it, and where you develop projects in the Scratch editor. In the
Scratch Editor, the main parts are:
Menus – You can change the language, use the File, Edit, and
Tutorials options when required.
Main Tabs – Switch from coding, drawing, or adding sound.
Coding Area – Drag and drop the blocks here and snap them
together to create your program.
Start and Stop – Click the green flag to start your code or the stop
sign to stop it.
The Stage – Your program will run here.
Stage Size – Use these buttons to make the stage smaller, set it to
normal size, or fill the screen.
Sprites – The objects that move around on the stage.
Sprite info – Displays information about each sprite, such as how
big it is, what its position is in x and y planes.
Choose a Backdrop – Add a new background to your project.
Choose a Sprite – Add a new sprite to your project.
Sprite List – All the sprites in your project are shown here. The
selected sprite has a blue border around it.
Tutorials – Some help videos are shown here. Click
the white X to close this panel.
Code Blocks – The code blocks in the current group are shown
here. Scroll down if you can’t find the block you want.
Block Categories – Code blocks in the Block Palette are sorted into
colored groups. Click a category to scroll to the block in that
category.
2.1 Menus
From the Menus, you can click the Language icon (globe sign) to change
the language of the Scratch user interface. From the drop-down menu,
anyone can change the language of their project. You can consult the
Scratch Translation Team; if the desired language is not on the list, it is a
team of Scratchers that give their time in helping translate projects from
English into other languages. Providing projects in several other languages
helps the project to be appreciated by more people from all over the world.
The File menu lets you create a New project, Load one
from your computer, or Save the project you have created. There are two
options in the Edit menu, one allows you to restore a sprite and the second
one helps you turn the Turbo mode on or off. Turbo Mode is a function in
Scratch that executes the code as quickly and efficiently as possible. It is
used to speed up your projects. By using turbo mode, it will transfer the
resources from interface, such as the movement of sprite on the stage, to the
computation, i.e., code running, either in the Scratch editor (online mode)
or within the computer (offline mode). Projects like Drawing projects, Big
mathematical operations, 3D engines, and Pen projects, etc. may use the
Turbo mode.
The last menu is ‘Tutorials’; by clicking on it, you can find tutorials for
entire projects such as ‘Make a Chase Game’ or specific features and
blocks, i.e., ‘Record a Sound’ and ‘Make it Spin’ etc.
The code tab allows code blocks to be dragged into the coding area. In
order to optimize how your sprite looks, select the Costumes tab. You can
incorporate a new sound in your project through the Sounds tab.
2.3 Sprites
All the projects are composed of ‘sprites,’ which are two-dimensional
objects or pictures that have their own codes associated with them. Scratch
has a vast library of sprites, you can either choose one from to use in your
project, or you can draw the image yourself in the built-in paint editor. You
can also use any image file that is already saved on your computer, or you
can even draw a picture on paper to import the image into your computer
and then add it to your Scratch project. A sprite can be made to look like
whatever you want. It might look like a cat, a bunch of bananas, some text,
or even a picture of your best friend, or you can draw a favorite fictional
character. Sprites, either created by the user, uploaded, or present in the
sprites’ library, are the main objects that perform all the actions in a
particular project.
Although the Stage can also be designed in a project, but most projects have
at least one sprite too because only sprites are movable. Scratch enables its
users to bring the sprites to life in different ways, such as by moving them
in the air, making them think or say words or phrases using text balloons,
but also by making them create noises, shrink, grow and change costumes.
Sprite Creation
For creating sprites, there are four buttons in the bar present above the
sprite list. They are:
The search button lets you select a sprite from the library.
A sprite with an empty and blank costume is
created by the paintbrush button .
2.4 Costumes
A sprite has more than one appearance or look, just like you have more than
one set of clothing. The way in which a sprite look is called its costume.
You can change the costumes of a sprite to create a simple animation. To
describe the change in a sprite’s appearance in the program, some sprites
have more than one costume. For instance, there is a sprite called ‘penguin,’
it has one costume with its mouth closed and another with its mouth open.
With the Scratch Editor, you can draw your personalized costume on any
sprite and convert and save your images in Vector or Bitmap file formats.
The creation of Bitmaps is much simpler, but Vectors look sharper.
2.5 Command Blocks
1. Motion blocks
These are the blocks which control the movement of a Sprite. In Scratch
version 3.0, 17 Motion Blocks exist.
The following 15 Motion Stack blocks are present in Scratch version 3.0:
2. Looks blocks
These blocks control the appearance or looks of a sprite. Scratch version 3.0
has twenty-three Looks blocks in it. Three out of the nineteen sprite Looks
blocks contain an equivalent part for Stage.
The following 18 Looks Stack blocks are found in Scratch version 3.0:
and
Switches the costume or backdrop of sprite or Stage to the one
specified.
3. Sound blocks
These blocks control the sound of the Project. 16 Sound
blocks are present in Scratch version 3.0. In 3.0, the note blocks are placed
in the Music Extension category.
The following 8 Sound Stack blocks are found in Scratch version 3.0:
4. Events blocks
These blocks control the execution of scripts and the events. 8 Event blocks
are present in Scratch version 3.0.
The following 6 Event Hat Blocks are found in Scratch version 3.0:
5. Control blocks
These blocks control the scripts in the Projects. Scratch version 3.0 has 11
Control blocks.
The following Control Hat block is found in Scratch version 3.0:
6. Sensing blocks
These blocks sense or detect things in a Project. 21 Sensing blocks are there
in Scratch version 3.0.
The following 3 Sensing Stack blocks are present in Scratch version 3.0:
variable.
7. Operators blocks
These blocks perform string handling and math functions. Scratch version
3.0 contains 18 Operators blocks. The following 7 Operators Boolean
blocks are found in Scratch version 3.0:
8. Variables blocks
These blocks hold the variables and lists. The 11 list blocks and 5 Variables
blocks are found in Scratch version 3.0.
4 Variables Stack blocks found in Scratch version 3.0 are as follows:
9. My Blocks
These blocks are made by users or custom blocks. Scratch version 3.0 has
two unique types of My blocks in it.
My Blocks Hat block found in Scratch version 3.0 is as follows:
It is a custom block.
It is easy to work with the scripts. The following instructions can help you:
2.9 Sound
A sound is an element which you can hear and play in a Scratch project; it
is available in the built-in sound library of Scratch, can be imported, or can
be recorded. Sound blocks are used to play the sounds that also regulate the
tempo, volume, etc. of a sound. All the sounds in Scratch are monophonic.
Every sprite can also one or more play sounds. To play a sound in your
project, you shall have to create a script that will tell the Project when or
what to play. A vast library of sounds also comes with Scratch, or you can
import sound files or record new sounds.
Sounds and Notes
In a project, all sounds played are split into two categories: sounds and
notes.
a) Sounds
Sounds are objects which can only be accessed by recording or importing.
These are accessed from the Sounds tab, where sounds can be imported,
recorded, played, and edited.
The sound playing is regulated by these blocks:
Play Sound () — It starts the sound and runs the rest of the script,
not waiting for the sound to end
playing.
Play Drum () for () Beats — Plays the given drum for a specified
number of beats.
Play Note () for () Beats — Plays a specified note from an
instrument selected in the other blocks.
Set Instrument to () — Sets the existing Instrument to the
Instrument selected from the options of the drop-down.
Set Volume to () — Sets the volume of a sprite.
Change Volume by () — Changes the volume of a sprite by a
specified amount.
Set Tempo to () bpm — Sets the tempo of a sprite affecting the
speed of the beat.
Change Tempo by () — Changes the tempo of a sprite to the
specified amount.
Rest for () Beats — Plays the rest for a specified number of beats.
Sounds Accessibility
a) Importing
You have to view the Sounds tab of a sprite or stage to access the sound
files and click the Import button, which exists as a folder. You can import
sounds from your desktop, Scratch's own sound library, or various other
locations. When you convert a surround sound audio file to a monophonic
sound file, the surround channels are deleted. This is because of the
limitations of Scratch with the sound.
b) Recording
Sounds can be exported, recorded, imported, modified, and edited in the
sound editor. It gives easy options for editing a current sound for various
benefits. For additional advanced options that are not present within
Scratch, you can use another sound editor, but it is suggested that you
should not record the music from any other websites since this can give
low-quality music with lots of quietness and background noise. The best
way to do it is to import music. While recording sound in the Sound Editor,
it may help you to increase the volume a little before recording. Increasing
the volume will make it simpler for Scratchers to listen to the sound they
recorded when the project is executed.
Synchronizing Sounds
The first time the Scratch Player plays a sound, there is a slight delay. This
delay will not be noticeable when working on the project, only when the
page is reloaded completely. The consequence of this is that if one message
activates two scripts, one animation and one playing a sound, the animation
script will start to run even before the sound begins. This can be prevented
by a very short pause using only a 'Wait Block' before the animation script.
Sound Editor
The Sound Editor in Scratch allows a user to edit and remix sounds. The
sound editor has two main areas: The Sound List and Editing Area.
a) Sound List
To pick sounds for editing in the editing area, the sound list on the left is
used. It will be selected by clicking a sound. To indicate that they are
selected, selected sounds have a thick blue border. In order to erase the
tone, selected sounds often have an "X" on the top right. On right-clicking a
sound, you will get three options; export, duplicate and delete.
b) Editing Area
The editing area is the section present on the left of the stage and to the
right of the sound list. It has a bar on the top, the sound in the center, and
various tools at the bottom.
Features
There are nine tools at the bottom: slower, faster, softer, louder, fade-in,
mute, fade-out, robot, and reverse. Every tool provides its own effects, and
you can use them together to make remarkable sound effects.
1. Top Bar - These tools just edit the sound but do not have any
effects. Before Scratch version 3.0, they were found in a dropdown
called "Edit."
2. Name - This is a round text box that is used to change the name of
the sound in the Sound List to be displayed.
3. Undo - The last action is undone with this.
4. Redo - Last undone action is redone with this.
5. Copy - This will copy the selected portion of the sound, or if
nothing is selected, the entire sound.
6. Paste - This pastes any sound that has been copied to the end of the
sound file.
7. Copy to New - This creates a new and identical sound file to the
one copied from.
8. Delete - This deletes the part of a sound that is selected.
9. Bottom Bar - To manipulate the sound, these tools create special
effects. They were in a dropdown called "Effects" before Scratch
version 3.0.
10. Faster – This fastens the speed of a sound, making the notes
higher.
11. Slower – This option slower the sound and lowers the notes.
12. Louder - This makes the sound louder.
13. Softer - This makes the sound softer.
14. Mute - This makes the sound silent.
15. Fade In - This makes the sound soft at the start and back to
the normal volume slowly.
16. Fade Out - This makes the sound normal volume at start and
gets softer slowly.
17. Reverse - This makes a sound play backwards.
18. Robot - This softens and adds static to the notes and makes it
sound like a robot.
Context Menu
The menu of the Coding Area has three choices when you right-click it. A
feature for one-button mouse is also present, which lets you bring up the
menu if you hold down the left button of the mouse. The options of the
menu are as follows:
The comment (default)In the editing area, when you right-click on a block,
the following options are given to you with "Add Comment":
Define : This only happens when the custom block is used. It will
scroll down to the defined block in the code area.
There are some options given for certain blocks. The options switch the
block to an identical block; this is applied to:
All lists: A directory of lists will be shown, and the list reporter
will turn to that list when you click on one.
Use
Simply drag the blocks out of the given eight palettes to code in Scratch and
arrange them together in the Coding Area. Scroll the bars to extend the area
to the right or downwards if necessary. You can also modify the block
values which are in the block palette, but when the palette is redrawn, it
switches back to the default value. The code or script area can be scrolled
vertically using a mouse or touchpad. The field can also be scrolled
horizontally using a touchpad.
You can remove the blocks by dragging them to the block palette. An
alternate way is to remove blocks by right-clicking (control-click for Macs)
and in the drop-down menu clicking "delete".
How to switch to the Code Area
It is easy to switch to the code area: select the Code tab present above the
Block Palette and click the X button at the top right to the library, or simply
click the X button at the top right of the open tab.
Regular
Normal mode; the stage is 480×360 pixels.
Full-screen mode
It fits the player to the current resolution of the user’s web browser.
2.12 Backdrop
A backdrop is an image that can be shown on the Stage. It is similar to a
costume, except that it is shown on the stage instead. They are located in
the backdrops’ library. You can choose new backdrops from the library, can
paint them, upload them, or choose as a surprise. The Stage can change its
look to any of its backdrops using one of the code blocks. They can be
named, edited, created, and deleted in the Paint Editor. When one chooses a
backdrop, one can pick from 85 different backdrops. You can also edit and
draw your backdrop, and when you’re drawing on the backdrop, the
Costume tab changes to the Backdrops tab. The drawing tools for
backdrops work in just the same way as in costumes.
Chapter 3 Event-Based Programming
Event-Based programming is in which the code is built on events, which are
identical to message broadcasts. For example, when the mouse is moved, a
"when mouse moved" event will activate all the scripts. Events, called event
attributes, have their own attributes. For example, the current mouse x
position, previous mouse x position, distance moved, etc. are the attributes
when the mouse is moved.
3.2 Tutorials
This tutorial will give scripts for the main events:
Mouse moved
Any key pressed/up/down
Mouse down/up/clicked
Format of an event
1. Mouse Moved
This event in Scratch is not already programmed but can be repeated easily.
This event causes particular lines/stretch of code in other programming
languages to be executed as the mouse travels. It is not necessarily essential
for the mouse to move over a specific object. Movement over a specific
object is often attributed as "hover" and is usually used in other languages
such as CSS.A simple or normal script used in Scratch to check if there is a
movement of the mouse works as follows:
Mouse up
Mouse down
Mouse clicked (for about 0.4 seconds or even less than this)
The script is as follows,
Key Up or Down or Pressed
The event is similar to the previous event of mouse
movement up and down, but on the keyboard.
Variable-Switch Alternative
Not every programming language is designed for a large number of in-built
events, and some may not even be multi-threaded, so event replacement
variables are essentially used. A variable simply stores a value and can be
used to cause different looping conditions and run a code sequence by
exchanging the value of the variable. In Scratch, for instance:
Blocks
From scratch, there are a total of fourteen Hat blocks. Out of fourteen, four
are used as code for extensions. Whereas, with every case of a custom
block, a hat block is made. They are:
Define ()
When ()
When () () ()
When () > ()
When () Key Pressed
When () Key Pressed (Makey Makey Extension)
When () Pressed in Order (Makey Makey Extension)
When Backdrop Switches to ()
When Distance < ()
When Green Flag Clicked
When I Receive ()
When I Start as a Clone
When This Sprite Clicked
When Tilt = ()
Use
Excluding Hat blocks, scripts can be enabled physically by clicking them,
but not at all online. There is a special way for each Hat block to get
triggered, so various scripts can be launched at different points in time.
There are four main ways to trigger a script: a key is pressed when the
Green Flag is pressed, and the sprite
is clicked when a broadcast is produced. A picture of the “When I Receive
()” block can be used as shown below:
The single method a project can run without this block would be to detect
the pushing of a button by pressing a character/sprite or by utilizing a timer
block; the task will only last till all scripts had terminated, dependent on the
initiating scripts. In all Scratch designs, this green block is the highly
accessible block. Although scripting projects
devoid of this block are entirely feasible, it is not suggested; the flag marks
the beginning of a project, so this block detects when the task begins.
Example of Uses
Once a project begins, several things happen at once these happen at this
time since all the tasks are hatted with block. Some frequent uses:
Beginning a project
Removing all objects in a list
Playing a song
Forming clones
Workaround
For the “Green Flag” block, it is the single existing workaround. When the
task first starts, Scratch inhibits all of the hat blocks, but after the green flag
is pressed, the countdown is fixed to 0, then the blocked hat is activated.
The only issue with this approach is that once an operator turns to a task, it
immediately activates it.
The Block “Stop”
"Stop" click block is a block event that many scratchers have requested,
which activates once the stop sign is clicked. Typically, these applications
are denied since the stop symbol was meant to end the task, not to activate
other scripts/modules. The stop symbol is intended to stop a task. The
following method is used in a workaround for the "Stop" block:
When the stop is pressed, the timer does not reset, letting the timer value to
increase above 0.2.
In most cases, apart from the green flag clicked block, starting a new task
established on an event has a big benefit over beginning a task directly.
Some examples of this are shown below:
.
2) Game Restart
This sequence is for a play where, when they lose, the participant is offered
a shot to replay a game.
When each script was programmed to begin once the
green flag block is pressed, the below-mentioned script will be present in
the project instead.
3) Title Screen
This explanation is about a title screen being added to a game. These
programs include the script that follows here.
The sprites are that serve as keys that the player presses on to begin the
game after the title screen is displayed.
This approach can be used to make a program that displays the title screen
before it begins. It is unlikely for the project to begin the game directly
without clicking the "Start" button.
Any image that expands from the canvas will not be used when
transitioning a vector image format to a bitmap; only a 480x360
scale/resolution image can be produced to the fullest in the bitmap editor.
Vector graphics end up losing the characteristics that are distinctive to them,
unlike bitmap to vector. Anti-aliasing is expressly excluded. Therefore, in
appearance, a seamless vector object can become a misshapen and very
blur. While transforming from vector to bitmap, Converting it back to
vector will not keep the vector characteristics as objects had before this
process, but undoing it will put back the qualities it had before.
1. Gradients
There are four choices on top of the three sliders. These allow an area to be
blended between the two colors you have chosen. If one of the choices
other than the solid color option is clicked, two selected colors are
displayed. To edit them independently, click on each of the colors. When
you use one of these options to cover an area, it is termed as the gradient.
Choosing 'Swap' flips their sequence between the two shades.
2. Picking Colors
There is a color dropdown menu in the Scratch paint editor that has three
sliders which can be used for selecting colors: saturation, color, and
brightness. It is located on the editor's center-left page.
3. Brightness
This choice influences the way the color is light or dark.
When the right side is the chosen color, the left side remains completely
black.
4. Color
Moving a color slider would change the shade of the color (from blue to
red, for example). As it has the greatest differentiation between colors, this
method is the most used.
5. Saturation
How bright is the color depends on the saturation of color: 100 saturation is
of the chosen color, 50 saturation is of a lighter color, whereas 0 saturation
is white.
7. Picking Up a Color
There is an icon or symbol on the bottom right that enables you to select a
color from the outfit (costume), sometimes known as the "eyedropper." It
will amplify the region when the mouse pointer is close. Whereas, On the
front is the color you are floating over. Tap to select it.
8. Naming Costumes
Just click on the text bar at the top-left side of the paint editor to name a
costume and put the new name. The title of the costume is critical to the
organization and in coding the project on occasions. It is best not to label
costumes with just numbers but with no other symbols or letters because it
creates problem during the selection of the costume blocks; this is because
each dress having both a label and numerical value in the costumes window,
so changing to costume "2" might mess things up if the third costume is
also called "2".
2. Outlines
There is a dropdown menu that switches the outlines of items to the right
side of the color dropdown. h It even has three dials, but you cannot
combine two colors at the same time. An input to pick the width of the
outline is at the right side of the dropdown menu. You can enter a digit or
use the directions to alter it.
A gradient outline is developed in August 2020.
3. Layers
The picture shows the Giga layering in front of Nano. In the vector editor,
the paint editor also contains the
layering objects' functionality. Object layering places them in front of or
behind each other. There will be four buttons on the top right side that allow
you to layer items in front of or behind another one. Forward and Backward
shift items one layer at a time on the left side, while Front and Backshift
them in that outfit to the very front or back, behind and front of all other
items.
Note: It is only possible to layer the objects, but not the individual splines.
4. Grouping
It can be helpful to organize them when there are plenty of items that you
need to pass at once. To choose a specific area of the outfit, use the select
tool, and click Category. These objects are one object now and can be
transferred together. The ungroup option does the contrary; it is possible to
split one grouped object selected into smaller sections.
Note : When you combine objects, the object splines are not removed; you
can still change them.
From right to left, top to bottom: No turn, horizontal turn, vertical switch,
vertically and horizontally switch.
There is the option to vertically and/or horizontally flip it when you pick an
element. An object's flipping inverts it. In specialized terms, when an object
is inverted, it uses each pixel and places it with the origin of (0,0) at the
opposing position in the middle. There are two tools at the top of the editor
that appears like two arrows pointing to a punctuated line. The one on the
left horizontally flips the object, the one on the right flips the object
vertically.
6. Curved/Pointed
There are 2 choices to the right side of the outlines when you are using the
reshape tool, which causes the splines to either pointed, like its a rectangle,
or curved (like an oval). When making patterns with both curved and
pointed sides, this is beneficial. If more than one point is chosen (hold the
Shift key and press more than once),
the specified adjustment is applied to all of the selected points.
1. Select
The mouse-pointer tool, which is the first tool, is used to adjust, stretch,
compress, or rotate an object's position. A blue box appears around it when
an item is chosen by a mouse-click with this tool, and the item can be
relocated by taking the center and rotating the mouse. By moving the two
tiny arrows below the box, rotation is achieved. The object moves from the
center of the image to the direction of the rotation circle. Finally, with the
measurement frames that exist on the outside edge of the collection box,
objects may be extended and compressed.
Note : Click the mouse button in the blank area to select various, ungrouped
items, and the box will move around the preferred location; all objects that
the box hits will then be selected.
2. Reshape Tool
A picture edited with a tool to reshape it.
This Instrument is used in the editor to bend or alter the shapes of a spline
by catching the points with cursor and dragging them around. There was a
"Smooth" key that replaced some splines in Scratch 2.0.
4. Eraser
Outside the circled field, the eraser moves splines inside its reach. In
Scratch 3.0, this tool was first released. It is unique from the bitmap
erasable marker tool as it
creates the same shape as the spline it had removed.
5. Paint Bucket
The paint tool can also be confusing, as it only fills in vector items instead
of coloring in a field. For example, since it is not an entity, you cannot paint
in the blank backgrounds of an outfit or backdrop with the vector paint
tool. Click on the inner or outer side of any object when the paint pool is
loaded to change the color to the selected color.
Note: You cannot fill the vector paint bucket in any confined space because
it must be an entity. It might be better to perform the process in the bitmap
editor first while coloring the backgrounds and then move to vector. Any
area, closed or unclosed to the context, or the boundaries themselves, may
be colored in the bitmap, but the splines must be linked into a uniform,
closed-in object in the vector editor. As in previous models, the paint bucket
will not be used to fill in outlines.
6. Text Tool
The above picture shows the fonts in the vector editor. The text tool, which
can be resized after execution, can be used to type letters, symbols onto the
canvas. Select anywhere on the canvas to type text; when mouse shows,
start typing. By shifting the resolution boxes that show around the text
window, one may set the vertical and horizontal text boundaries. If you
have done, click on a blank space to leave the text editor. Pick it with the
mouse-pointer to resize the text afterward, and move the measurement
boxes to make the text meet the desired size. After leaving the text editor,
the text can be edited by clicking on an already existing text with the text
tool. Towards the bottom-left side, Text Tool is comprised of nine
accessible fonts to choose from Serif (Times), Sans Serif, Curly,
Handwriting, Pixel, Marker, ⽇本語 한국어
(Japanese), (Korean), and 中
⽂ (Chinese). By
creating a drawing, entering the preferred text in, selecting the font, taking
the image, then loading the image to the preferred sprite, and resizing or
shifting the text to suit one 's needs, more fonts can be obtained using
Google Drawings.
Note : The Sans Serif fonts can appear as a large Serif font due to an error.
To fix this issue, modify the font and then save the draft. That doesn't fit
often, so instead of using Japanese, Korean or Chinese fonts, they all look
nearly identical to Sans Serif font.
7. Line Tool
In the vector editor, the line tool is being used for forming straight sharp
lines. A line is made up of two points of the spline; one at the start and one
at the end. To draw that line, press and keep holding the mouse, and then
release the line from the mouse's starting point, press to release the
endpoint.
Note: To draw a smooth curve, first, you need to draw a clear line, select
the reshape method, and then click at any place on the line to construct a
new line curve.
1. Paint Brush
A paintbrush is merely a tool for designing wherever you click the mouse
pointer. The color, scale, and size change the pen marks of the paint brush's.
To change the size of the brush, simply go to the lower left-hand corner of
the slider and adjust it to your required level.
2. Line Tool
For creating straight lines, the line tool is used. Keeping the Change would
make the line completely vertical or horizontal in the versions of Scratch
before Scratch 3.0. With the Shift function, there was an error where the
line eventually ended up where the mouse-pointer was, not absolutely
straight. Now, keep holding the Shift key allows you to build lines at ideal
angles of reference (such as -180 degrees, 90 degrees, or -45 degrees).
5. Text Tool
6. Paint Bucket
The paint bucket is being used to fill one solid color into every closed
region with a common color. This can be done by clicking on the canvas in
the target place. The paint, which has the same color on it, tends to spread
everywhere.
The color will spill out of the form if the shapes have tiny holes in them.
Before using this method, search for any gap
7. Eraser
The eraser tool is being used to delete (or remove) a canvas area that has
been selected. No color appears in the place of the colors that are removed,
ensuring that the field is see-through. It does not create an outline, unlike
the vector eraser.
8. Select
The select tool (previously known as screen region grabber) is being used to
pick and move, extend and compact an area on the canvas, or somehow
change it. The clicking and moving around the target region will
accomplish this. Then, around that field, a blue window will appear. You
can switch the section around if you hold the middle of the dotted box with
the mouse. With the measurement boxes that emerge around the outside,
you can also spread and condense it. Rotate the segment with the help of a
blue arrow section located below the targeted area.
Chapter 5 Drawing and Animation Tutorials
All the tutorials related to drawing and animation can be found in this
category.
3. Hold and add this script exactly above the block right-clicked
(change x by). And repeat this copying and adding three more
times. Don’t forget that you have to right-click the new top block
every time.
Repeat the following sequence sixteen times after the above code.
The following technique is an alternative for the above and is much easier:
Even though this is simpler, but it does not produce pleasing results, so you
must make a trade-off between complexity and convenience.
Similar Examples
simple 3D engine
3D Man
3D train
5.2 Animating a Sprite
It is a process in which a sprite keeps changing its costumes again and again
to create an animation. Animation scripts depend upon the speed and
number of costumes; that’s why different kinds of scripts can be made.
The same effect is created by this script, but it saves space, which is very
useful if several costumes are displayed.
Another way to animate a sprite is by making use of operator blocks. This
technique provides better control of the animation.
Until a specific costume is attained, this script keeps animating the sprite,
allowing the sprite to perform many actions, e.g., move, converse, stop, and
move again.
Delay in Animation
Every now and then, the animation formed is faster than anticipated
because costumes might change rapidly. To slow them down, the ‘Wait ()
Seconds’ block is added into the script of animation. The wait time is
altered as per the frame rate, such as smaller wait times for more frames.
The following script is an example of an inefficient script that causes a
delay in animation:
The second delay block is used numerous times in the concise script and
will, thus, have to adjust according to the use.
When the animation-delay is changed constantly by the same number, it is
possible to insert a variable in the delay block and modify it constantly in
the Repeat () block:
A list may be used if the delay of the animation changes unpredictably; the
list's items will give the delay in the animation:
5.3 Chats
The script will continue to loop repeatedly. After a nice chat, the script can
get quite long, but it does not use several broadcasts. This method is mostly
suited for disordered chats, which has multiple sprites that do not speak to
each other in an ordered manner.
Method of Lists
This method utilizes a similar amount of scripting, however lengthy the
chat is. It is a perfect way of reducing long scripts and the file size of a
project. Two scripts are used in this method of both sprite’s messages. The
first sprite states a message and stimulates the second sprite to chat, and
then the loop begins, with a variable being altered to indicate the next
message from the lists after both have properly communicated. The lists are
used to merely store the content within it, which each sprite speaks, and it is
organized. The script for Scratch Cat is as follows:
As stand-alone projects
Racing games
The movement of the character
War/battle games
Animated art
If used with blocks like Glide or other Motion Blocks, they are incredibly
helpful for creating motion look more natural.
Making it Walk
A sprite is added, and the character's walking costumes are designed. Then
the script to create is as follows:
5.6 Animated GIF
A GIF, an acronym for a graphical interchange format,is an uncompressed
format of image files that animates itself and assist the animated images as
well as static images. There seems to be no limit to the number of frames in
a GIF, but the longer it is, the heavier it is, and often has a little more lag.
Animated GIFs are the files that can be displayed in a series, creating an
animation of several frames. People use Animated GIFs as signatures and
profile or display pictures. Unlike many other image forms, animated GIFs
are quite in demand on the Internet, attributed to the reason that they are
animated. Nevertheless, they are occasionally denounced for excessive
usage, lag, and irritation, particularly shiny ones. In your projects, it is
typically advised to preload the GIFs or employ GIFs that move slowly and
have less frames. It is preferred to compress the large GIFs.
Animated GIF Import
Importing an animated GIF requires the following steps:
You can just simply remove the ‘fps’ (abbreviation of frames per
second) variable for any random number. A greater value would
enhance the speed, and an error will be produced by the value '0.'
Because of the lag while scratch executes the block "next
costume," the overall frames per second would always be a little
less than the variable. 24 fps is a standard frame rate for films.
Costumes for Animated GIFs
As Scratch can transform animated GIFs into costumes, some individuals
would like to be capable of transforming costumes into animated GIFs.
Since individuals will be able to transfer their Scratch animation to some
other application, it would be quite beneficial. That's not really a Scratch
feature yet, but
there are online and external resources that facilitate this feature, so it
allows the costumes to be exported. It might be time taking.
1. Palette MAP
Users of this type of MAP use those colors only, which have already been
selected by the map’s host. In Scratch, usually, the users are permitted to
use little color variations as instructed by the host, i.e., they are only
permitted to use the shades of colors present inside the color palette. A
theme, tone, or given emotion or even mood is frequently supported by this
type of MAP.
2. Line-art MAP
Rather than drawing in the portions where the color is normally set,
individuals using this type of MAP draw the line-art only for animation.
This type of MAPs may contain a palette too, but it is very rare.
3. Fandom MAP
Individuals using this type of MAP utilize fandom in the animation, e.g.,
personalities from a famous video game, book, television show, or film, for
instance, Warriors, Gravity Falls, Doctor Who, etc.
4. OC MAP
Individuals using this type of MAP are only permitted to make use of
Original Characters (OCs). According to the host’s rules created for the
MAP, this type of MAP either allows or doesn’t allows the fandom Original
Characters.
5. Scripted MAP
Individuals using this type of MAP can only animate scenes that have been
‘scripted’ for them or asked of them by the MAP host.
6. PMV MAP
PMV is the abbreviation of ‘Picture Music Video’. Individuals using this
type of MAP does not animate; they rather draw pictures of the scenes.
Some parts of the pictures might be animated that move steadily and
contain little animation parts, for example, the lights flickering in the back.
7. Vent MAP
Individuals using this type of MAP pour out their intense emotions in part
assigned to them.
8. Spoof MAP
A song or audio is made fun of by the individuals using this type of MAP.
9. Sketch MAP
Rather than coloring and/or lining their parts, individual using this type of
MAP only draws the sketch.
1. The host has to select the audio file and then upload it on the
scratch. The best method to get your audio is to search it
on YouTube. The music must comply with the Community
Guidelines and should not include any terms that are unacceptable
for Scratch. The host may go to an mp3 converter after getting the
audio from scratch.
2. The host then has to import the file either on the sprite or backdrop
after moving to the scratch editor.
3. •Optional part • The host can make a copy of the
audio to get two duplicates. The final results of the scratch editor may
not always be smooth; that’s why to get a smooth form of the audio
for your project, you should not change one of the audios.
4. The host now has to pick the portion of the audio that he wants and
click on 'Copy to New'. After that, click on 'delete'.
5. Must repeat the till audio is divided into a suitable
number of portions.
Projects Signup
The MAP host usually creates a forum post or project with each cut up
portions, data related to the MAP, and all the guidelines. The host mostly
makes a similar script to the following script for playing the portions and
showing which portion is being executed:
The host mostly adds a code word in his uploaded project to display
whether an individual has gone through the sprite limit, all of the rules, and
lyrics of the track.
Final Project Creation
When an animator has completed his task, the host backpacks and adds the
sprites used by the animator to some other project. The host posts the
project when all sections of the project are done and so that everyone can
view the full MAP.
Chapter 6 Game Design Tutorials
This section involves tutorials relevant to game creation or game-related
things.
The above script has a little defect. If you were to increase the clicking
power for an upgrade or to construct a building, the earlier script would not
run. The script given here will run in that situation.
b) Buildings
Before constructing the buildings, you have to make a decision. You could
either show the buildings beside the clickable, or you could show them after
you use a button.
Button Section
You must make two costumes first, one of these for entering a store or shop
and the other for leaving it.
Creating Buildings
First, generate a sprite for the building, variables for cost, and the number
of buildings you own.
To the buildings, add these scripts.
Ball Formation
Draw a small circle as a sprite to make a ball and then make it bounce,
move, and end the game if it does not touch the paddle, with the help of the
script below:
6.3 Two-Player Racing Game
A racing game played by one player vs. another player is a project which
allows you to participate in racing with your friends.
Sprite 1
Make a new sprite and switch its costume to a car; it is available in the
Sprites library. Then put in an ‘if <>
then’ block, ‘Point in Direction’ block, ‘Move () Steps’ block in the given
sequence, like the given script:
Keep doing this with all the arrows, i.e., down arrow, left arrow, and more.
Next, put these scripts in the ‘forever’ block, and put a ‘when green flag
clicked’ block at the top. It will look like the following script:
Sprite 2
To make the second sprite, again take a car costume from the library of
sprites. Repeat the steps taken for sprite one; just change the arrow keys
with the letter keys, e.g., W (up), S (down), D (right), and A (left). It will
look like the following script:
Backdrop
Next, you should paint a backdrop first in the Paint Editor, and remember to
draw a finishing line (black and white); it is necessary to end the game.
Sprites
Once the backdrop is made, add the code below to both
sprites:
Instructions
Up, down, left, and right keys can be used to move the Sprite 1, and W, A,
S, and D keys can be used to move the Sprite 2.
Variables
These are an important part of the game. Create a first variable called
‘Money’, and then assemble a script, which will make the money of player
zero at the beginning of the game, like the one given below:
Your game character is taking food from a shop, so create a sprite of the
shop and place it in the script.
The given script is very easy and keeps your character from falling into
debt.
Shops
It is one of the variables. You can create your shop sprite like this:
The ‘Item 1’ box in the above sprite shows an isolated sprite; you can place
a picture or sprite of food in the empty white box and create a script for the
player to get food when it is clicked. Following scripts are used to show or
hide the shop sprite:
You must use the previous script for the above variables.
You can make different types of shops, such as general stores, grocery
stores, etc. if you want to make it advanced and are ready to put effort. Your
player must buy the food from the shops to survive in the life simulation.
Social Actions and Non-Player Characters
Non-Player Characters (or NPCs) are added to the life simulation game to
make it fun. You can chat with NCPs
or interact with them. They shall treat the player according to their
behavior. They can be player’s relatives or families such as parents,
children, or siblings, or you can find them in the shops. If you find games
with NPCs difficult, you can fulfill the social need of character by simply
adding a program that it talks on the telephone when T (or any other key) is
pressed. This will increase the player’s Social points. You can add both
programs to your game to make it interesting.
Salaries
Several life simulation games make the player earn their salaries to make
them able to buy various items. For that, the player needs to pick a career
first and must go to work and bring a salary home. This is the way to earn
salaries. The fixed amount of salaries can be given daily or monthly on a
fixed date. So, you will need to add a date system too. You can add several
jobs in the game.
Home
In life simulation games, the character needs to have a home to live in. The
character can buy the furniture and decorations for its home with the money
earned from the jobs. More houses can be bought to make a community and
a city, consequently. But it can keep getting
complicated and might bothersome to maintain. So, you can pay more
attention to other life-related topics rather than forming communities. It will
be a smart decision to just work on the basic needs of the character within
the house, as it will take less energy and time.
Hunger
It is a realistic feature that is essential for the life simulation project. The
character can get rid of hunger by purchasing the food from the shop and
eating it. To make the character hungry again, introduce different activities
like the workout, cooking, walking, cleaning, etc. A hunger variable can be
created for it, with 10 being the highest value for the satiety of player and 0
for extreme hunger and drained energy. The player can be made hungry by
using this script:
6.5 Platformer
It is also called a ‘platform game’. It is a famous video game category in
which the character jumps over the obstacles or to and from the suspended
platforms. Mostly the game characters are given realistic actions like
walking, rolling, and jumping, etc. Platform game
usually contains themes, for instance, a famous platform game called "Don't
Look Back" makes the player move forward only, and it cannot look back.
Various Scratcher finds it difficult to create an accurate platform game
because of the complexity of calculations and trigonometry involved in
programming.
Elements of Platformers
1) Colors
Various platform games let the player interact with several colored areas
because they are created in that way. The red color is used mostly to show
volcanic emission of lava, but it should be prevented. Colors sensing can be
used in Scratch to affect the player size or motion; for instance, when
touching a specified color, the player gets an extra bounce or get shrunk by
touching another. The ground or Platforms on which the character stands or
jumps are naturally given land colors, like brown, green, or black. In
addition, other common colors can be added, such as water is represented
by blue.
2) Control
To make the character move in a platform game, keys are assigned for all
the directions of motion. The most common keys used are the arrow keys
( ↓ for down, ↑ for up, ← for left, and → for right) or the WASD keys
(W for up, S for down, D for right, and A for left). After the release
of Scratch version 3.0, Scratch is now available on mobile devices as well.
Though a keyboard is not used on mobile devices when looking at the
projects. For that purpose, many Scratchers have made mobile-friendly
platform games that let you just touch the mobile screen to move the sprite.
3) Wall Jumping
Jumping over the walls or climbing up the walls is a well-known feature
used in various platform games, for instance, static platformers, scrolling
platformers, and pen platformers. Although a lot of Scratchers use this as a
fun feature for their project, there are also some Scratchers who exclude
because it makes the game impractical, particularly when a realistic
platform game is to be made.
Scrolling Platformers
For the smooth scrolling in Platform games, a transition between different
locations is created to make it seem the player is being followed by the
camera. It suggests that the map should move to make space for the next
coming terrain. It explains that the sprite or character is present in a fixed
place on the screen. It can be helpful as it will let the creator elevate the size
of the level and form it further realistic, to give the player a pleasant time.
Nevertheless, such kind of platform games needs extra work than the other
non-scrolling platform games.
Static Platformers
Some levels of a platform game or the whole game may be made non-
scrolling. The next scene comes if you have reached your target or by
touching the corner of your screen. Such games are simpler for coding
because they do not require extra code for scrolling.
Pen Platformers
Platform games may be formed with a pen as well. Pen blocks are used to
code every platform of the game or some of them. Pen platform games may
be static or scrolling. Coding a Pen Platformer is hardest as compared to
simple static or non-scrolling platformers; since the codes used are very
complex, even the creator doesn’t actually draw the sprites of platforms but
code them in a way that they draw their platforms by themselves by making
use of pen blocks.
Platformer Sprite Formation
The sprite in a platformer is a character that the player controls. Based on
the size and angles of the Costumes of the sprite, its looks may influence
the game a little. For instance, if the brim of a character’s hat is caught by
the edge of an overhang, he should not be protected from falling down.
Animation of Sprites with several costume switching is trickier, as the
switched costume may get dragged into the ground and get trapped.
A platformer sprite formation requires an easy script like the following
example: It makes use of two variables only:
Jumping
The following code is used for jumping:
Levels Formation
To detect the end of a level or to make a character return to the first level,
colors are used in a platform game. It is explained in the tutorial below:
Once you are done making all the levels, add a script in the ‘Player’ sprite
like the one given below:
It is possible to combine the scripts inside the 'forever' loop with the script
previously mentioned. Combining the scripts decreases the set of conditions
being tested simultaneously can potentially make the project more coherent
and organized, ensuring that each movement is made by the "Player" and
then tests for its conditions rather than the conditions that might be tested
during the movement of the sprite.
A condition is an assumption that is tested for a false/true answer. In the
above example, when the
sprite detects if it touches a color, it tests for a condition.
Then apply the script below to any of the sprites:
You can draw whatever you like, for objects and players.
The shape of the hitbox has to be rectangular or anything that fills
the area so it can touch a player.
The whole screen must be filled with the background and should
link well, so the background transitioning becomes smooth.
c) Variables
This script will hide the hitbox sprite, but every other sprite can detect it
when touched. The hitbox moves to cover the Player properly.
The script used for the Player sprite is as follows:
The positions will be reset with this script. The script used for the
Background sprite is as follows:
This script will push the background to the middle and place it behind all
other sprites.
The script used for the Object sprite is as follows:
b) Basic Movement
The virtual X will be changed to move the backgrounds. Increase the script
of the Player sprite like this:
Movement of Background
Increase the script of the Background sprite like this:
This will move the background to show the movement of the player. Put
this script in it too:
This will insert a copy of the shifted background to the right (one Stage
width), so the illusion continues.
Movement of Object
Increase the script of the Object sprite like this:
It will let it appear in the right place with respect to the player. That is what
you require to make a scrolling game. You can add extra objects with
different behaviors, according to your choice.
RPGs in Projects
If RPGs are made in projects, that project is developed and submitted by the
Scratcher that owns it. Typically, the project provides details regarding the
RPG as well as its characters. Other Scratchers comment on the uploaded
RPG project, much like comments on a forum post. Projects’ comments can
be used by RPGs as sources of character details or other material.
RPGs in Studios
Many Scratchers favor studios over projects to create RGPs. As you can
form several projects associated with the RPG in the studio rather than just
one. Since the studio itself can never contain a project on it, the RPG
information is put in the notes of the studio. People can play RPG by
putting comments in the studio notes similar to projects. Some examples
are:
There should not be any god-like powers and should not go beyond
the rules of RPG.
There must be no Super flawed characters
There shall be no power playing that means
regulating the other characters.
Good timing can allow someone to "clip" into the wall by using this
detection method and walk around easily by clicking the arrow opposite to
the direction they like to go. Also, a new way wherein the background shifts
when the sprite hits the end and translocate the sprite to the other end is the
only way to get to places outside the view of the screen using this process.
Scrolling Movement
This is a more complex movement approach in which the player remains
centered, but the background changes, giving the player an impression of
moving. Infamous RPGs (e.g., Pokémon), it is more usually observed but
can be harder to develop.
Some sprites and parameters are required in order to make floating
movements:
6.8 Maze
Mazes, as they seem to be generally easy to program, are a popular form of
game type projects. A common method of maze construction includes
barriers in which the user-controlled specific sprite will be sent to the start
of that stage of gameplay if it encounters another sprite. Some variations do
not let the user go through the walls, such as scrollers. There are several
backgrounds for other maze games that simulate a sense of various stages,
rooms, or locations. Many puzzle games have multiple levels with various
themes. By using the mouse pointer, certain maze games have the player
controlling the main sprite.
1) STM Maze Games
The simplest maze games are STM (Short Term Memory) maze games that
do not require pressing the green flag but rather use conditional statements
to push the sprite. After hitting barriers, several STM maze games often
trigger the managed sprite to go back to a specified point on the stage and
shift to the next level until the objective has been achieved. This maze game
has basic programming that moves the sprite by using conditional
statements.
2) Classic Maze Games
Classic puzzle games typically look like paper mazes. The sprite is not sent
back to the start by some classic maze games, but they only prevent access
that the sprite cannot go beyond. On a sheet of paper, this maze game has
basic programming and a look that matches that.
3) Complex Maze Games
Complex mazelike games have scripts that can be mammoth in scale.
Different "rooms" or screens have complicated maze games that simulate
traveling around a large universe. Most complicated maze games have walls
that cannot be crossed by the player, and there are numerous backgrounds
that mimic rooms and levels.
Maze Game Tutorial
Simply select Sprite; let us say we have picked "Gobo" first of all. Next,
pick a backdrop or paint a background of your own, but it should appear
like a maze.
For example:
For new scratch users, the maze lines should be Red, and the little circle
should be of Yellow color.
Then, create the subsequent scripts:
And follow these scripts:
Ensure that the player can run through the Maze without touching the outer
Maze line of Red color.
If the player wants to play more, then put a broadcast message as shown
below:
The creator should make sure that there are a similar number of mazes on
the menu as there are levels in the game. And put the Blue dot in the last
level to show that game ends here.
Lastly, allow it to be pulled. Just click the blue color "I" close to the
thumbnail of the sprite, then enable it to be dragged on the player.
Often, an interactive story can allow users to comment on ideas for the next
thing to happen. They are also regarded as 'projects of collaborative stories.'
Talk Shows
In these programs, using texts or programmed speech bubbles with the Says
block, two or maybe more sprites speak to each other. These story projects
are prevalent because they are simple to design for a new Scratcher.
The animation will be slower when there are more frames in it.
And the animation will be faster when there are less frames in it.
The less frames there are, the higher the movements seem 'choppy'.
Choppy shows the motions would appear to miss the animation. For
example, it would be good if a stick figure is flickering, but if the
figure is waving its arm, then the arm would appear to move very
rapidly and then stop.
Try to have a smooth movement of the objects. This indicates that
the animation, like it was just put together, needs to look seamless,
not robotic, and choppy.
Animation
Begin by creating your character. Copy the drawing then. If a stick figure is
a central character, create their lines of arms and legs, then reshape the way
other frames ought to be. It is also possible to make various shapes for the
hands and portions of the arms and legs and shift them around in
multiple frames.
Frame-By-Frame
It's all about using this long part of creating animation for any story. For
minor changes, the character must be reused, and while this can be time-
consuming, it is vital to the animation. Just note that it will take a while for
this portion, and everyone who animates needs to be patient. It might be
better to shape a group and animate sections of the story animation with
different scratchers. On the aspect of the story animation that they really are
best at, Scratchers will work. For instance, if the story animation asks for a
walking period, if that Scratcher expertise in that area, have a Scratcher
animate the sprite walking.
Uploading
To import it to Scratch, take the animations of the collaborators and bring
them under one project, offer the collaborators credit, and post it.
Have Fun
The most critical aspect of creating story animation is having fun. The
animation of the story mirrors the mood of the animator or authors. Most
audiences want animations of stories that can amuse or 'wow' them. That is
the role of the animator to attract or 'wow' them.
Add a Twist
If a joke is apparent or overused in the cartoon, try to confuse the audience
by introducing something unforeseen. This will catch their attention even
more to the animation.
Aftermath
The animation of the story can be completed at this stage, but it is always
very helpful to get feedback. It is not always very productive to upload the
project into a test account. It may be weeks or perhaps even months before
such a Scratcher sees enough online feedback to go back and make any
adjustments to the story animation.
Chapter 7 Music Projects
A music project is a program where its main role is music. They may
include music files uploaded or music created or captured with the Scratch
software. Music videos, Interactive instruments, and games featuring
striking, hitting, or playing notes in a series to form a song (called as
rhythm games) are famous ones of music projects. Images or recordings of
Scratchers or other musicians performing music are also the other kinds of
music activities. Music theory or tuning requires several substantially less
common forms of the music project. Music projects are not called games
with music in the background. By playing a couple or more of these scripts
simultaneously, chords can be formed.
7.1 Types
1. Interactive Instruments
The Scratch software, which enables the user to select from a range of
instruments, may produce sounds. There are actually 21 different timbres of
the instrument which can be used. Scratchers may, instead, record
themselves with the microphone of the Scratch
program for more realistic sounds.
2. AMV
An AMV is an animation formed around the lyrics and melody of a song
performed in the background, or "Animated Music Video". On Scratch,
they are very prominent and sometimes enter the front page.
3. Recordings
In terms of style and genre, recordings vary: they can be instrumental or
vocal, classical, or pop. Often, they are regarded as covers.
5. Reverse Music
Some programs, often created for entertainment or humor, play current
songs in reverse. This is achieved by using the Sound Editor. There will be
added "lyrics" in some reverse music programs, referencing "back
masking," another music technique.
6. Self-Composed Music
Some Scratchers create and launch their own music on Scratch. In a
computer program, music may be produced and maybe with a recording.
8. UTAU Songs
Most of the Scratch users have developed their own UTAU characters and
posted songs featuring them. UTAU is a free and popular singing app
named on the Japanese word meaning "To Sing."
7.2 Music Projects Restriction
On June 8, 2017, it was declared that due to the potential possibility of
copyright infringement and not driving innovation in general, projects
playing only music, not by the artist, would be taken down. Since other
music download websites such as YouTube are restricted in
schools, many people complained about it, though, and that users can
conveniently use the backpack to get the music to use in programs instead
of trying to download it to their computer.
On the keys, the note names are mentioned. Notes written in the two most
common keys are related to the piano (treble clef and bass clef). In an
infinite number of ways, all notes can be recorded. They include the most
popular enharmonic tones. A line that goes from a large red box means that
the notes are from the same chord on the piano. Although the drop-down
keyboard displays only one octave of notes per each block, to have any
note, a number can be placed manually. Simply add or remove 12 to alter
octaves or click on the arrows of the keyboard. On the Scratch's keyboard,
♭
there really are 131 notes, labeled from 0 (C-1, about 8.18 Hz) to 130 (B
9, about 14917.24 Hz). Every note is 1 digit higher than the previous one,
and the frequency ratio always seems to be 12√2 (about 1.06), with A4
representing 440 Hz.
Consider that the value may be altered depending on the precise needs of
the project. The "BPM" means that changing it will change the song's
tempo. If the song's tempo is uncertain, you must experiment before you get
the pace you want (which also meets the time signature). Set the volume to
the desired amount afterward. The default is 100 percent, but it can be
modified.
First, build the steps that are desired. Most of the time, one single script will
be used to play all the steps in the album. This script reproduces the entire
project. If a particular measure needs to be reproduced later, the same
broadcast can also be used several times at various points in the album.
Making Measures
This part of the note block project is probably the most enjoyable part of
creating a project, the music within. Select a time signature you like or
interpret the sheet music of the song being decoded. Please ensure all the
beats included add up to the number of beats in a measure when making a
calculation. We'll use 4/4 time for this example, meaning that within a
measure, there are four notes, and the quarter note has one beat. One
indicator of a song is here:
Inside a song, all beats add together up to 4 beats. Though, in this example:
This works as the pitch effect will delay and accelerate sounds. The
minimum pitch effect block can go is at a value of -360, showing that it is
difficult for pitch effect blocks to completely pause sounds. Therefore, you
need the set volume to 0 blocks. Otherwise, you'd still be willing to listen to
the echo. Although it may be difficult to pause sounds completely this way,
using this approach, you might still get similar.
Resuming Sounds
This script will produce the sounds resume:
This code just restores the impacts of the "pause sound" custom block.
Music
This music is non-compulsory:
Chapter 8 Ways to make your Scratch Project
popular
This is a tutorial on how a user can get more likes and hearts on their
Scratch project, as well as to make the user best known. Always note that
reputation is not an essential part of the Scratch culture and that it is more
important to learn the program, communicate imagination, and assist others.
Contain a link-up
Use appropriate grammar and spelling.
Put a picture
Give valuable knowledge
What is it?
Why is it distinct from other projects?
Ask for advice on certain points.
Do not forcefully react or get offensive to a negative
response.
2) Signature
Perhaps doing it in one's forum signature is a much more productive form
of marketing a project. If one is a current user of the site, then several
individuals can view it. With the signatures, a certain basic thing applies as
with ads for the forum thread. Getting just text, however, would make it
very boring, and individuals will have less
chances to spend money on it. A perfect way of keeping people involved is
to have a photo commercial. The Scratch Forums have many demand
subjects for custom signatures/adverts. This should involve an illustration
that portrays the project in an entertaining way, and it always helps with a
captivating slogan. In Show and Tell, you may need to integrate this with
the forum topic and give a link to the subject.
Here's a list of what might be of help:
8.2 Followers
It helps to have many fans, as they look at the project in
the window the "Scratchers I'm Watching" section of the Projects on the 1st
Front Page. In "Projects Liked by Scratchers I'm Following", Scratchers
might see the project, so it aids to be pursued by the well-known user; even
you have an ordinary number, you shall never plead for followers.
Getting Friends
You shall discover somebody with common interests in order to make
friends. Offering supportive and nice comment is also a great way to make
friends. Instead of simply complementing that a project is "nice," "good," or
"cool," it is recommended to include experienced and complete comments
with input on the project. Don’t be scared to ask questions about how
something has been done by a developer. Many people are glad to support
other scratch developers, and they will typically recognize you. And here is
another list which would help you get a better view of your projects: