In this lesson we will learn the basics of scratch and moving sprites using cartesian coordinates.
This course is going to show you many of the core features of Scratch and give you some practice with them. When you're done you should be able to make your own simple games or move on to our advanced course!
In this lesson we are going to familiarize ourselves with the basics of the scratch environment and add the ability to move the player around the scene using the arrow keys!
Here is a demo version of the game we are going to build.
Click the green flag to start the game and give it a try. Beware, it is very difficult!
This block is called an "event block" or "hat block"
We can use these blocks to activate blocks of code when certain things happen.
Now when we click the green flag above our game, it activates our code!
Notice that activating the code blocks does the same thing!
That's because the "move" block moves the sprite in the direction it's pointing, and sprites start out pointing right. This will make more sense once you've done the next few steps.
The location of a sprite or the mouse in the game area can be determined by the X (horizontal) and Y (vertical) position.
The cat moves up when we press up on the keyboard now!
Try to generalize what you learned in the last step.
This is because the code we build is specific to the sprite it is on, so the code we've done so far is only on the cat sprite. The dog sprite has no code on it because we just created it.
NOTE: Remember to change the rotation style to left-right for the dog sprite!
Refer to step 19 if you need help remembering what to do.