scratch workshop handout 2010

14
Scratch: Imagine, Program, Share Thursday, February 25, 2010 10:00-12:30 ICE Conference St. Charles, IL Michelle Russell Kildeer CCSD 96 [email protected] Judith Epcke Northbrook District 28 [email protected]

Upload: michellerussell

Post on 18-Nov-2014

126 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Scratch Workshop Handout 2010

Scratch: Imagine, Program, ShareThursday, February 25, 2010 10:00-12:30

ICE Conference St. Charles, IL

Michelle RussellKildeer CCSD 96

[email protected]

Judith EpckeNorthbrook District 28

[email protected]

Page 2: Scratch Workshop Handout 2010
Page 3: Scratch Workshop Handout 2010

People have access to an incredible variety of interactive games, stories, animations, simulations, and other types of dynamic, interactive media on their computers today.

But, for the most part, these programs are a one-way street: you can only browse and click what others have created; you can’t design and create your own. Scratch changes that, broadening the range

of what you can design and create on the computer, making it easier to combine graphics, photos, music, and sound into interactive creations. With Scratch, you can

create characters that dance, sing, and interact with one another. Or create images that whirl, spin, and animate in response to movements of the mouse. Or integrate images with sound effects and music clips to create an interactive birthday card for a friend, or an interactive report for school.

The name Scratch comes from the scratching technique used by hip-hop disc

jockeys, who spin vinyl records back and forth with their hands to mix music clips together in creative ways. You can do something similar with Scratch, mixing different types of media clips (graphics, photos, music, sounds) in creative ways. At the core of Scratch is a graphical programming language that lets you control

the actions and interactions among different

media. Coding in Scratch is much easier than in traditional programming languages: to create a script, you simply snap together graphical blocks, much like LEGO bricks or puzzle pieces.

Once you’ve created a Scratch project, you can share it on the Scratch website, the same

way you might share videos on YouTube or photos on Flickr. Or you can embed your Scratch project in any other webpage – for example, embedding an interactive Scratch animation on your MySpace or Facebook homepage. You can get new ideas for Scratch projects by browsing through projects on the Scratch website. If you like one of the characters or images or scripts in another project, simply download the project and use parts of it in

your own Scratch project. Below are snapshots from projects that other people created with Scratch. What do you

want to create with Scratch?

Lifelong Kindergarten Group, MIT Media Lab

Page 4: Scratch Workshop Handout 2010

!"#$%&'%($)&*+$(%!"#$%%#(%$"*,%-.*#$*%/+$*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%$'%*:;.*((%$"*2(*80*(%2'.*%?)88,%#+&%-.*#$/0*8,1%"*8;(%$"*2%&*0*8';%#(%8'3/-#8%$"/+B*.(1%#+&%"*8;(%$"*2%)+&*.($#+&%$"*%4'.B/+3(%'?%$"*%+*4%$*-"+'8'3/*(%$"#$%$"*,%*+-')+$*.%*0*.,4"*.*%/+%$"*/.%*0*.,&#,%8/0*(<%+8"2"$"%*"0+L*$"/+B/+3%M*#.+/+3%/+%$"*%N/3/$#8%=3*%"$$;AOO444<2*&/#<2/$<*&)OP2.*(O;#;*.(O4*?<;&?%%M*#.+/+3%?'.%$"*%QR

($%H*+$).,%S"$$;AOO444<QR($-*+$).,(B/88(<'.3OT%

M/?*8'+3%U/+&*.3#.$*+%V.');1%WD>%W*&/#%M#9

Page 5: Scratch Workshop Handout 2010

Most people view computer programming as

a tedious, specialized activity, accessible only to those with advanced technical training. And, indeed, traditional programming languages like Java and C++ are very difficult for most people to learn. Scratch, a new graphical programming

language, aims to change that. Scratch takes advantage of advances in computing power and interface design to make programming more engaging and accessible for children, teens, and others who are learning to program. Key features of Scratch include: • Building-block programming. To create

programs in Scratch, you simply snap graphical blocks together into stacks. The blocks are designed to fit together only in ways that make syntactic sense, so there are no syntax errors. Different data types have different shapes, eliminating type mismatches. You can make changes to stacks even as programs are running, so it is easy to experiment with new ideas incrementally and iteratively.

• Media manipulation. With Scratch, you

can create programs that control and mix graphics, animations, music, and sound. Scratch extends the media-manipulation activities that are popular in today’s culture – for example, adding programmability to Photoshop-style image filtering.

• Sharing and collaboration. The Scratch

website provides inspiration and audience: you can try out other people’s projects, re-use and adapt their images and scripts, and post your own projects. The ultimate goal is to develop a shared community and culture around Scratch.

Scratch offers a low floor (easy to get started), high ceiling (ability to create complex projects), and wide walls (support for

a wide diversity of projects). In developing Scratch, we put high priority on simplicity, sometimes even sacrificing functionality for understandability. As students work on Scratch projects, they have opportunities to learn important computational concepts such as iteration,

conditionals, variables, data types, events, and processes. Scratch has been used to introduce these concepts to students of many different ages, from elementary school through college. Some students transition to traditional text-based languages after getting introduced to programming with Scratch. Scratch is built on top of the Squeak

programming language. It was inspired by previous work on Logo and Squeak Etoys,

but it aims to be simpler and more intuitive. Scratch is an open-source but closed-development project. The source code is

freely available, but the application is developed by a small team of researchers at the MIT Media Lab.

Lifelong Kindergarten Group, MIT Media Lab

Page 6: Scratch Workshop Handout 2010

REFERENCE GUIDEhttp://scratch.mit.edu

REFERENCE GUIDE

11

BLOCK DESCRIPTIONS!e Scratch blocks are organized into eight color-coded categories: motion, looks, sound, pen, control, sensing, numbers, and variables. Motion

Moves sprite forward or backward.

Rotates sprite clockwise.

Rotates sprite counterclockwise.

Points sprite in the specified direction. (0=up, 90=right, 180=down, -90=left)

Points sprite toward mouse-pointer or another sprite.

Moves sprite to specified x and y position on Stage.

Moves sprite to the location of the mouse-pointer or another sprite.

Moves sprite smoothly to a specified position over specified length of time.

Changes sprite’s x-position by specified amount.

Sets sprite’s x-position to specified value.

Changes sprite’s y-position by specified amount.

Sets sprite’s y-position to specified value.

Turns sprite in opposite direction when sprite touches edge of Stage.

Reports sprite’s x-position. (Ranges from -240 to 240)

Reports sprite’s y-position. (Ranges from -180 to 180)

Reports sprite’s direction. (0=up, 90=right, 180=down, -90=left)

Page 7: Scratch Workshop Handout 2010

REFERENCE GUIDEhttp://scratch.mit.edu

REFERENCE GUIDE

12

LooksChanges sprite’s appearance by switching to di!erent costume.

Changes sprite’s costume to next costume in the cos-tume list. (If at end of the costume list, jumps back to !rst costume.)

Reports sprite’s current costume number.

Changes Stage’s appearance by switching to a di!erent background.

Changes Stage’s background to next background in the background list.

Reports Stage’s current background number.

Displays sprite’s speech bubble for specified amount of time.

Displays sprite’s speech bubble. (You can remove speech bubble by running this block without any text.)

Displays sprite’s thought bubble for specified amount of time.

Displays sprite’s thought bubble.

Changes a visual e!ect on a sprite by specified amount.(Use pull-down menu to choose e"ect.)

Sets a visual e!ect to a given number. (Most visual e"ects range from 0 to 100.)

Clears all graphic e!ects for a sprite.

Changes sprite’s size by specified amount.

Sets sprite’s size to specified % of original size.

Reports sprite’s size, as % of original size.

Makes sprite appear on the Stage.

Page 8: Scratch Workshop Handout 2010

REFERENCE GUIDEhttp://scratch.mit.edu

REFERENCE GUIDE

13

Makes sprite disappear from the Stage. (When sprite is hidden, other sprites cannot detect it with touching? block.)

Moves sprite in front of all other sprites.

Moves sprite back a specified number of layers, so that it can be hidden behind other sprites.

SoundStarts playing a sound, selected from pull-down menu, and immediately goes on to the next block even as sound is still playing.

Plays a sound and waits until the sound is finished playing before continuing with next block.

Stops playing all sounds.

Plays a drum sound, selected from pull-down menu, for specified number of beats.

Plays a musical note (higher numbers for higher pitches) for specified number of beats.

Sets the type of instrument that the sprite uses for play note blocks. (Each sprite has its own instrument.)

Changes sprite’s sound volume by specified amount.

Sets sprite’s sound volume to specified value.

Reports sprite’s sound volume.

Changes sprite’s tempo by specified amount.

Sets sprite’s tempo to specified value in beats per min-ute.

Reports sprite’s tempo in beats per minute.

Page 9: Scratch Workshop Handout 2010

REFERENCE GUIDEhttp://scratch.mit.edu

REFERENCE GUIDE

14

Pen

Clears all pen marks and stamps from the Stage.

Puts down sprite’s pen, so it will draw as it moves.

Pulls up sprite’s pen, so it won’t draw as it moves.

Sets pen’s color, based on choice from color picker.

Changes pen’s color by specified amount.

Sets pen’s color to specified value. (pen-color=0 at red end of rainbow, pen-color=100 at blue end of rainbow)

Changes pen’s shade by specified amount.

Sets pen’s shade to specified amount. (pen-shade=0 is very dark, pen-shade=100 is very light)

Changes pen’s thickness.

Sets pen’s thickness.

Stamps sprite’s image onto the Stage.

Control

Runs script below when green flag is clicked.

Runs script below when specified key is pressed.

Runs script below when sprite is clicked.

Waits specified number of seconds, then continues with next block.

Runs the blocks inside over and over.

Runs the blocks inside a specified number of times.

Page 10: Scratch Workshop Handout 2010

REFERENCE GUIDEhttp://scratch.mit.edu

REFERENCE GUIDE

15

Sends a message to all sprites, triggering them to do something, and waits until they all finish before con-tinuing with next block.

Sends a message to all sprites, then continues with the next block without waiting for the triggered scripts.

Runs script below when it receives specified broadcast message.

Continually checks whether condition is true; when-ever it is, runs the blocks inside.

If condition is true, runs the blocks inside.

If condition is true, runs the blocks inside the if por-tion; if not, runs the blocks inside the else portion.

Waits until condition is true, then runs the blocks below.

Checks to see if condition is true; if so, runs blocks inside and checks condition again. If condition is not true, goes on to the blocks that follow.

Stops the script.

Stops all scripts in all sprites.

Page 11: Scratch Workshop Handout 2010

REFERENCE GUIDEhttp://scratch.mit.edu

REFERENCE GUIDE

16

Sensing

Reports the x-position of mouse-pointer.

Reports the y-position of mouse-pointer.

Reports true if mouse button is pressed.

Reports true if specified key is pressed.

Reports true if sprite is touching specified sprite, edge, or mouse-pointer. (Selected from pull-down menu.)

Reports true if sprite is touching specified color. (Click on color patch, then use eyedropper to select color.)

Reports true if first color (within sprite) is touching second color (in background or another sprite). (Click on color patch, then use eyedropper to select color.)

Reports distance from the specified sprite or mouse-pointer.

Sets the timer to zero.

Reports the value of the timer in seconds. (The timer is always running.)

Reports a property or variable of another sprite.

Reports the volume (from 1 to 100) of sounds detected by the computer microphone.

Reports true if computer microphone detects a sound volume greater than 30 (on scale of 1 to 100).

Reports the value of specified sensor. To use this block, you need to have a Scratch Board connected to your computer. See http://scratch.mit.edu/scratchboard

Reports true if specified sensor is pressed. To use this block, you need to have a Scratch Board connected to your computer. See http://scratch.mit.edu/scratchboard

Page 12: Scratch Workshop Handout 2010

REFERENCE GUIDEhttp://scratch.mit.edu

REFERENCE GUIDE

17

Numbers

Adds two numbers.

Subtracts second number from first number.

Multiplies two numbers.

Divides first number by second number.

Picks a random integer within the specified range.

Reports true if first number is less than second.

Reports true if two numbers are equal.

Reports true if first number is greater than second.

Reports true if both conditions are true.

Reports true if either condition is true.

Reports true if condition is false; reports false if condition is true.

Reports result of selected function (abs, sqrt, sin, cos, tan,

asin, acos, atan, ln, log, e^, 10^) applied to specified number.

Reports remainder from division of first number by second number.

Reports closest integer to a number.

VariablesAllows you to create and name a new variable. When you create a variable, three blocks are created automatically (see below). You can choose whether the variable is for all sprites (global) or just for one sprite (local).

Deletes all three blocks associated with the variable.

Changes variable by specified amount.

Sets variable to specified number.

Reports value of variable.

Page 13: Scratch Workshop Handout 2010

While the Scratch website allows projects to be saved to the gallery section! some

teachers may not want their students" projects on the Internet or may want the ability

for students to take their projects home# It is possible to share student projects on both

Windows and Macs by burning them to a CD#

To ensure projects burned to CD will play on ANY computer! certain $les need to

be included# These $les can be found in the folder containing the Scratch application#

Information adapted from Scratch Programming for Teens by Jerry Lee Ford, Jr. © 2009 Course Technology

Page 14: Scratch Workshop Handout 2010

Where to go for more information

Some books:• Scratch Programming for Teens

by Jerry Lee Ford, Jr.

• Scratch 1.4by Michael Badger

Some websites:• Scratch Website

http://scratch.mit.edu• ScratchEd

http://scratched.media.mit.edu• Workshop Wiki

http://scratchworkshop.wikispaces.com• Additional links

http://delicious.com/michellerussell/scratch