Welcome

Featured

Welcome!  If you’d like to create animated drawings, games, and stories using Scratch software, I hope you’ll enjoy these self-paced lessons. Beginners should explore Getting Started, where you can learn the basics. With a little experience you’ll enjoy the worked projects in Drawings, Games, and Stories. The Featured Projects on this home page require the most skill; they explore particularly elegant techniques and leave you to work out the full project independently. Enjoy!

Terry Dash
terryldash AT gmail.com

String Art

This project creates a piece of string art — a complex geometric shape drawn with only straight lines. (You could arrange pieces of string in the same way.) Watch the movie below to see how the finished project works.

Can you figure out how to make this project? Here are some hints:

Hints

1.
There are two sprites. Each sprite looks like a small, black dot. Both sprites start their scripts in the same way. They:

  • Clear the previous drawing.
  • Raise the pen up.
  • Go to the center of the screen.
  • Set the pen color.

2.
The first sprite now repeats some steps many times. To begin, add a repeat command the first sprite’s script. Try changing the number of repeats until you get the effect you want. (Hint! Start with at least 100 repeats.)

3. 
The first sprite then repeats all of these actions:

  • Puts the pen down.
  • Goes to the center of the screen.
  • Turns by 45 degrees.
  • Moves by the number of steps in a variable named steps.
  • Changes the value of the steps variable by 1 step so that in the next repeat the sprite moves a little further.
  • Broadcasts a message to the second sprite to tell it to move.

4.
In the meantime, the second sprite completes the following actions whenever it receives a message from the first sprite.

  • The second sprite places the pen down.
  • It goes to the first sprite.
  • And it raises the pen.

Just in case it helps, here’s a slow-motion movie that shows how the two pens move. I’ve made the first sprite into a red square and the second sprite into a purple square just for this movie, so that you can see how they’re moving.

. . .

Try changing the turn command to different number values. Watch how the string art changes!

Have fun!


This project is based on http://scratch.mit.edu/projects/domben/770656 by domben at the MIT Scratch web site.

Tamara

Here’s a project that sings and dances! It’s based on the sample project that you can see if you start Scratch and then go to File menu > Open… > Examples > Names > Tamara.

As you pause your cursor over a letter, it bounces and makes a colored trail. The trail changes colors and appears at a slightly different location each time, but it’s always just below the letter. At the same time, the letter sings a note.

Can you figure out how to create this project? Here are some hints:

Hints!

1.
There are 5 sprites — one sprite for each letter of the author’s name (Terry). Each sprite’s script is quite similar to the others.

2.
Each sprite begins in the same way when the green flag is clicked:

  • It lifts the pen up.
  • It moves to its place on screen.
  • It clears the screen of any lines previously drawn by the pen.
  • It puts the pen down.

3.
What command makes a sprite spring into action when it is clicked? (Hint! This command isn’t placed beneath when green flag is clicked. Instead, it begins a new section of the script. Look within the control commands to find a command that activates a sprite when it is clicked!)

4.
Each sprite draws colored lines when it is clicked. The number of lines, their colors, sizes, and locations change a little each time a line is drawn. To achieve this variation, we use the pick random command. pick random selects a random number from within a range of numbers. For example, here’s a command that makes the pen glide to a different x: and y: location each time it draws:

You can use this same idea to change the pen size, pen color, and even the number of times that the letter draws lines. Can you figure out how?

5.
To make the sound occur at the same moment that you touch a letter, broadcast a message and then receive it within the same script, like this:

. . .

Here are all the commands for a sprite named t. Can you assemble them into a working script?

. . .

Have fun!

Simon (0s1s!)

Here’s a game that’s simple to play. It has no sprites and just one script! In the movie below, I demonstrate how to start playing the game…

If you look at the script, you can find some wonderful and elegant commands. Here are just a few for you to think about:

1.
The commands below cause the “<Space> to start” screen to dim and brighten. How do the commands achieve this effect? (Hint! timer counts elapsed time in tenths of a second. sin is a special element called a trigonometric function; no matter what values come immediately after sin of — in this case sin of timer * 200 —  the result is always a number between -1 and 1. The rest is up to you to figure out!)

2.
The commands below detect that you’ve clicked.

3.
The commands below detect where you’ve clicked. How does JSO figure out which button you’ve clicked on?

4.
The commands below describe which button to light up and which note to play. How do they work?

Hints!

  • JSO has created 4 images called light1, light2, light3, and light4. Each image shows one of the keys brighter than the others to indicate that it was pressed.
  • Also, JSO has created a variable list called notes which contains the four different sounds played by the four keys.

Simon (0s1s!) was created by JSO. You can see more of JSO’s work at http://scratch.mit.edu/projects/JSO.

Songo Sings A Song

This project (from Yumi9989_9989 at MIT’s Scratch web site) can be made with just 6 commands. The way that the background looks is especially appealing and involves only one command. Can you figure it out?

Hint!

The background looks like the picture below. There’s a script for the background that loops continuously, changing one characteristic of the background. What command does this magic?

 

Time For Dinner

Here’s a short story told in a few seconds. Can you figure out how the wheel moves, or how the cat’s mouth moves? How does the mother appear in the doorway to say, “Time for dinner?” It takes just a few scripts to make a sweet tale!

Hints!

The cat’s mouth, the steering wheel, and Mom are all created through a single technique. Each one is a sprite with many costumes. The script for each sprite makes use of the wait and switch costume commands to give the illusion of speaking or motion. In addition, broadcast tells Mom when to appear.

 

This project was created by clumeclo at the Scratch web site, http://scratch.mit.edu/projects/clumeclo/716955.

Fly

Simple can be good! This project contains just 5 commands, but it’s still captivating. Can you figure out how it was done?

Hints!

How can you create the fly’s jiggly motion?

  • Include a turn command that turns the sprite in different, random direction each time the command occurs.
  • At the top, center of the Scratch screen, you’ll find 3 buttons (a circle, a line, and a dot). The different buttons change the way that sprites respond to a turn command. When the bottom one is selected, as it should be for this project, the sprite’s body doesn’t actually turn even if it receives a turn command. But the sprite’s next motion will be in a new direction (the direction that the sprite “turned to”).
. . .
Try it! And have fun.

The project was created by Leylosh at the Scratch web site, http://scratch.mit.edu/projects/Leylosh/676374.

Starry Night

I love this Scratch project, created by Scratch user nikita_i, because it shows how a beautiful and rich animation can be created with just a few Scratch commands (puzzle pieces). In fact, this project involves fewer than 15 commands! If you want to try creating a project like this, there are some hints below.

Hints!

  • There are 45 stars in the sky. Each star has exactly the same set of commands, in the same order (script).
  • Each star begins its flight at the right side of the screen and moves constantly to the left. When the star reaches the left edge of the screen it jumps back and starts its journey again from the right.
  • Each star’s height in the sky, brightness, size, and speed are numbers chosen randomly. These numbers change each time the star makes a journey.

How did Nikita do it? Think hard!

If you’ve thought as hard as you can, you can see the answer by downloading her project from the Scratch web site at http://scratch.mit.edu/ (login required).