Scratch Exercise 1: Choosing a Sprite and Making it move in 4 directions.

The Scratch program was developed by MIT to teach young students programming concepts and develop skill in multimedia communication. Using a visual system of "Tiles" that contain commands users can connect together to create programs.  These programs direct the characters and objects in the game. 

Unique Scratch Fact: The Scratch program runs in a very different way than traditional programs such as Word or Excel.   When you run "Scratch" you are running a program called "Squeak" with the "Scratch.image."  (I am not making this up!)  The result is that the visual environment looks somewhat different than Windows XP. When you run Scratch and Squeak on different operating systems (Windows, OS X, Linux) the look and feel of Scratch remains the same. 

Scratch Layout:




Step 1: Choosing Your Sprite

A Sprite is an character or object in your game.  Sprites can move and be active or be props that stay still.  We will choose a Sprite character that will move about your screen.

1. Open Scratch
a. Go to the folder where you copied "Scratch."
b. Double click on the Scratch icon.

2. You will see the opening screen.



3. Click on the "Costumes" Tab



4. Click "Import"

5. Select a Folder (Animals, People, Things)



6. Choose a Sprite! (Double Click)



Step 2: Making Your Sprite Move in 4 directions (Right, Left, Up, Down)

Sprites can not do anything by themselves.  A Sprite's action comes from the scripts in the script window.  These scripts are the instructions for exactly what the sprite will do.  You drag these instructions from the Tile pane into the "Scripts" pane.  These tiles then fit together like a puzzle to create the insructions.

7.  Click on the "Scripts" Tab
8.  You want your Sprite to move to the right. Click the "Control" Button



9. Left Click and hold "When 'space' pressed" command and drag to the Scripts window.




10.  Click on the word "space" and select "right arrow." (We will make Sprite move right)



11. Click on the "Motion" button and drag "point in direction 90" over to the Scripts window.



12. Connect the "point in direction" tile to the "When 'right arrow' pressed" command.



13. Click the "Move 10 steps" tile and drag over to the Scripts window.



14. Connect "Move 10 steps" to the "point in direction" tile.



15. Press the right arrow on the computer and watch your sprite move to the right.

16. Making your sprite go left:  Drag the "When 'space' pressed" tile to the scripts window.






17. Drag "point in direction 90" over to the Scripts window. Connect to the "When 'space' pressed." tile.



18. Change the 'space' to 'left arrow.'  Change the '90' to '-90' to make the sprite face left:



19. Drag the "Move 10 steps" tile to the scripts window and connect to the 'left arrow' script.



20.  Now your left arrow will work!  Click the "just flip left-right" icon to make your sprite face in the correct directions.



21. Making your sprite move down: Drag and connect the following tiles:
a. "When 'space' pressed
b. "point in direction '90'"
c. "move 10 steps"



22. Set the direction to down:
a. Change 'space' to 'down arrow'
b. Change '90' to '180'



23.  Your down arrow should work!

24. Make your sprite move up: Drag and connect the following tiles:
a. "When 'space' pressed
b. "point in direction '90'"
c. "move 10 steps"



25. Set the direction to up:
a. Change 'space' to 'up arrow'
b. Change '90' to '0'



26. Now your Sprite should be able to move in all 4 directions!  Test your program by moving your Sprite about the screen.
27. Rename your Sprite as "Eater."
28. Save your work!  Click "Save" and name your file.

Scratch Exercise 2: Sense the World - Using Conditional Statements and Eating!

Back to Nebo Scratch Programming Projects Page