<< Chapter < Page | Chapter >> Page > |
Click here to view the applet. Close the page when finished viewing.
These five example projects are simply the tip of the iceberg in terms of the different purposes for which scratchers create projects. If you canimagine it in an animated computer program, some scratcher has probably already tried to do it .
Image 6 shows a reduced screen shot of the Scratch development environment. The text in Image 6 is too small to read in most cases. The main purpose of Image 6 is to show you the overall layout of the Scratch developmentenvironment.
Scratch is a sprite-oriented programming environment. Every Scratch project consists of none, one, or more sprites and a stage upon which thesprites perform the behavior for which they are designed.
A sprite is an invisible entity to which the programmer can assign numerous behaviors. Each sprite can have one or more costumes. The assignmentof a visible costume to an invisible sprite causes the sprite to also become visible.
The Scratch development environment provides a large gallery of costumes and you can create your own costumes if you don't find any in the gallery that suityour needs. A costume is nothing more than an image. The background in the image is normally transparent. You can import images from a varietyof different file types to create costumes. Probably the most difficulttask in creating a costume from an imported image is causing the background to be transparent (if the image didn't originally have a transparent background) . A built-in paint program is provided to assist in this task. You can alsouse programs such as the free GIMP image editor to deal with the background.
The project shown in Image 4 uses five costumes from a family of seven costumes that are available in the gallery. Six of the seven costumes areshown in Image 7 . The project shown in Image 4 uses only the five rightmost costumes shown in Image 7 .
As you can see, the five rightmost costumes describe five stages in a boy walking. The project shown in Image 4 cycles through the five costumes in such a way as to make it appear that the boy is walking. (This process is often called frame animation and dates back to or before the earliest days ofthe Disney productions.)
The stage is the large white rectangle in Image 6 . Different images can be assigned to the stage to serve as backgrounds for the performance of thesprites. The gallery contains a large number of background images, and you can also create your own. Usually for a background image, you don't havethe transparency issue discussed earlier so backgrounds for the stage can be easier to create than costumes for sprites.
Notification Switch
Would you like to follow the 'Teaching beginners to code' conversation and receive update notifications?