Introduction To Scratch
Introduction To Scratch
Adventures in Animation
What is Scratch?
Scratch is a free programmable toolkit that enables kids to create their own games, animated stories, and interactive art and share their creations with one another over the Internet.
Adventures in Animation
What is Scratch?
Scratch builds on the long tradition of Logo and LEGO/Logo, but takes advantage of new computational ideas and capabilities to make it easier for kids to get started with programming (lowering the floor) and to extend the range of what kids can create and learn (raising the ceiling).
Adventures in Animation
What is Scratch?
The ultimate goal is to help kids become fluent with digital media, empowering them to express themselves creatively and make connections to powerful ideas.
Adventures in Animation
What is Scratch?
Scratch is built on top of the Squeak environment developed by Alan Kay and colleagues.
Adventures in Animation
What is Scratch?
Scratch is being developed by the Lifelong Kindergarten research group at the MIT Media Lab, in collaboration with KIDS research group at the UCLA Graduate School of Education & Information Studies.
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adventures in Animation
Programming In Scratch!
The first thing you need to do is to click on the sprite you want to program, and select the Scripts tab. Since your sprite is the only thing that can be animated, make sure you have it selected. The Scripts area is where you build your program by using the programming blocks.
Adventures in Animation
Programming In Scratch!
In the upper, left-hand corner of your Scratch window, you will see 8 buttons . Each of these buttons have programming blocks in those particular areas. We will first experiment with the Motion blocks.
Adventures in Animation
Motion!
When you click on the motion button, you will see the programming blocks that can be used with your sprite. Lets all program our sprites with the same code first, and then youll be allowed to experiment on your own!
Adventures in Animation
Motion!
Drag out the move 10 steps block.
Change the 10 to 50 by clicking in the block and typing in 50. To see your sprite move 50 pixels to the right, double click on the block in the Script area. Cool, isnt it?!
Adventures in Animation
Motion
You can also set the motion block to move a negative number of pixels by typing a negative number in the block. This will move your sprite that number of pixels in the opposite direction.
Adventures in Animation
What Is A Pixel?
Weve been talking about pixels what is a pixel? A pixel is one of the small units that make up an image on a computer or television screen. It is derived from the words picture and element to make pixel!
Adventures in Animation
-240
240
-180
Adventures in Animation
More Motion!
Now, add the turn 15 degrees block to the other block of code. When you see the white bar between the 2 blocks of code, you can release your mouse. That white bar means that the 2 blocks will snap onto the other block.
Adventures in Animation
More Motion!
Again, you can change the number of degrees by double clicking in that area and typing in the number of degrees youd like your sprite to rotate. Double click on the blocks to see your sprite move and rotate!
Adventures in Animation
Adventures in Animation
Control!
The next category of programming buttons we will experiment with is the Control category. This is a very important category because it controls how many times an event happens, how long an event happens, or when an event happens.
Adventures in Animation
Control!
The first block Id like us to use is the when flag clicked block:
Drag this block out, and snap it on top of the blocks you already have in your script.
Adventures in Animation
Control!
Now, instead of having to double click on your block of code, you can just click on the flag icon to play your animation!
Adventures in Animation
When you click on the presentation mode button, your animation will fill the whole screen!
Presentation Mode
To exit presentation mode, click the arrow in the top left of the screen, or just press the Esc key.
Adventures in Animation
Back to Control!
Other powerful blocks in the Control category are the blocks that handle conditional statements. Conditional statements are commonly called if statements or if-else statements.
Adventures in Animation
Conditional Statements
This code means that if the user presses the Space key on the keyboard, the sprite will move 10 steps.
Adventures in Animation
Sensing!
The conditional statements must be used along with the sensing blocks. (Notice the shape of some of the sensing blocks. They are the ones that will fit inside the condition since they have 6 sides)
Adventures in Animation
Back to Control!
For the next few minutes, experiment with the blocks in Motion, Control, and Sensing. Right click on a block and select help to get information about a block. When you get something cool, Id like to see it!
Adventures in Animation
Sound!
Now, lets add some sound to our animation! There are many different ways to get sound in your animation. The first way were going to experiment with is by importing a sound from the Scratch sound library.
Adventures in Animation
Adventures in Animation
Adventures in Animation
Inserting Sound
Once you find a sound that you like, select it and click on OK. You will see the sound you just selected show up under New Sound.
Adventures in Animation
Adventures in Animation
Adventures in Animation
Adding Sound
Now, select one of the blocks that says, play sound
Select your sound from the drop-down menu by clicking on the triangle next to pop.
Adventures in Animation
Recording a Sound
Click on the record button to record a sound Click on the red button to start recording Click on the square to stop You can rename the sound by typing over the name
Adventures in Animation
Adventures in Animation
Time To Play!
For the next few minutes, experiment with Motion, Control, Sensing, and Sound! When you get something cool, let me see it!
Adventures in Animation
Adventures in Animation
Pen Challenge #2
Great job with Pen Challenge #1! Your second Pen Challenge is to use the tools to create an interesting design. Remember that you can change Pen color and shade!
Adventures in Animation
Numbers!
There are many animation effects you can create using Numbers in Scratch. One effect is random movement of a sprite!
Adventures in Animation
Random Movement
Remember that the Scratch animation area is 480 pixels wide and 360 pixels high. That means that the range on the horizontal axis is from -240 to 240. The range on the vertical axis is -180 to 180.
Adventures in Animation
Random Movement
This is the block of code I would use if I wanted my sprite to randomly glide the entire horizontal and vertical distance of my Scratch animation area:
Adventures in Animation
Numbers!
For the next few minutes, experiment with the tools in Motion, Control, Sensing, Sound, and Numbers. Click right on a block and select help to see what it does. When you get something cool, let me see it!
Adventures in Animation
Variables!
Variables are used mainly in the development of games. Open some of the examples in Projects > Games to see how variables are used to keep score in a game.
Adventures in Animation
Adventures in Animation
Adventures in Animation
Last Slide!
Remember to:
Be appropriate; Be creative; Have fun!
You will also be given a Scratch Help Guide, complete with screenshots to help you get started.
Adventures in Animation