This project will teach you how to animate characters in the Scratch Jr using a few simple blocks.
Duration: 15 mins
Programming Language: Block-based programming
What you will need:
- A laptop or desktop or an iPad
- Scratch Jr app (you can download the desktop version here)
Part 1: Sprites and Backgrounds
For this project, you will be creating an animal race where you can play against the two other animals
Create 4 backgrounds
- The first background is where the animals will run the race.
- You also need to put in the 3 animals of your choice in the first background. We chose the frog, bird and rabbit. The rabbit will represent us as the player playing against the other animals.
- You will also need to create a sprite for the finishing line. Just a red straight rectangle will do and put it at the right side of the backdrop.
- The second background will be shown if the rabbit wins. Don’t forget to add in the rabbit sprite.
- The third for when the bird wins so add in the bird sprite.
- The last is for when the frog wins and make sure the frog sprite is in it.
Part 2: Code
To make the animals move, you will need the following blocks pieced together.
- For the rabbit, when you tap on him, it will move one step. If it touches the red line sprite first, it will say it won and change the background to the second backdrop.
- For the bird, when you press the green flag, it will start moving at a medium speed of 16 steps until it touches the red line sprites first and change the background to the third backdrop while saying “I won”
- The frog will have the same set of codes as the bird but will it be moving at a normal speed of 16 steps. It will also change to the fourth backdrop if it touches the red line sprite first.
You can also watch and code along with our instructor here and you can also pin it below!