Hardware Reference
In-Depth Information
Figure 10-7:
Using input
blocks to control
the motion of a
sprite in Scratch
Now that the sprite can be moved by the player, it's time to give the sprite something to do.
As this is just a very simple game, the goal should also be simple: to collect some food. Click
the Choose New Sprite From File button, found in the middle of the three buttons above the
Sprite palette at the bottom-right of the Scratch window.
A dialogue box will appear asking you to pick a sprite: double-click on the hings folder, and
then double-click on the Cheesy-Pufs sprite (shown in Figure 10-8). his will place the sprite
as a new entry in the Sprite palette, giving you a new object to control in the game.
The Scratch language is naturally multi-threaded and partially object-oriented . This means that
each object in the program, including sprites, can have its own code attached, and that each
section of code runs simultaneously and independently of any other block. Used properly,
these features allow for some quite complex programs to be created.
TIP
 
Search WWH ::




Custom Search