More Free Scratch Instruction & Videos! Last week we posted the first in a series of FREE Scratch Lessons that we use at UCode as the basis of our Scratch Course. Why? We believe that many parents can teach Scratch and that this is a wonderful way to spend time with your child.
Here is a link to the first lesson:
This week’s lesson is about moving your Scratch sprite (a SPRITE is the image on the screen. You can choose your image, but the default is Scratch Cat.) The core concepts to be learned are the concept of a Grid and Coordinates.
There are two ways to move your sprite. In the last lesson, we use the MOVE STEPS COMMAND to indicate the number of steps you want the sprite to take. To go backwards while still facing the same direction, we used a negative number of steps.
The second way to move your sprite is the GO TO X AND Y COMMAND. This moves your sprite in a specific position on the screen. We tell Scratch the position we want using a GRID, which is a map on the screen. Here’s an example of the XY GRID. The X is the line across the screen from left to right. This is called the “horizontal axis”. The word “axis” just means a line and “horizontal” means a line that runs up and down the screen or in a vertical direction.
We use the numbers on these lines to tell the program where we want the sprite to move on the screen. These numbers are called COORDINATES. The position of our sprite on the screen is communicated to the computer using COORDINATES. The line that tells Scratch the position across the screen is the X COORDINATE and the other is called the Y COORDINATE as it designates the position on the up down or Y AXIS. The COORDINATES are like the address of your house, except in programming, we call this THE POSITION.
Where the X AXIS and Y AXIS lines cross is called?Can you guess it? The CENTER. The CENTER is defined as POSITION 00. So if your sprite has a position of 00, you know you’re always in the center of the screen. As our sprite moves on the screen, the COORDINATES change to help us know that the POSITION of the sprite has changed. As we move to the left,X gets smaller,we move to the right,X gets larger. If we move down,Y gets smaller, and we move up Y gets larger.
All right, here is a short game to play with your child to reinforce these concepts.
Where would the sprite be if it’s at Position X0 and Y0? Or (0,0). That’s right. It’s in the CENTER of the GRID.
What direction would the sprite move if it moves from the CENTER to position (0,10)?. That’s right, it moved to the up on the GRID.
Make up your own questions!
So to review, you can move your sprite using the GO TO X&Y COMMAND by setting the position you want as the coordinates on the grid. Pretty easy now that you understand coordinates and grids.
In the next lesson. We’ll work on DIRECTION & ROTATION.