Welcome to the Scratch Platformer lesson! In this lesson, you will learn how to create your very own platformer game using Scratch. You will design your own characters, create platforms for them to move on, and write code to control their movements. Let's get started!
Go to the Scratch website, create a new project and delete the cat sprite.
Go to the Scratch website using the link below and click on the 'Create' link in the blue bar at the top.
By default, each new project starts with the cat sprite already added. To delete the cat click on the x in the blue circle beside the cat in the sprite list.
In the game you will control a sprite that moves through the platforms.
Paint a new sprite and give it two costumes, one costume with the eyes looking right (call this costume "right") and one costume with the eyes looking left (call this costume "left").
You can design your sprite however you wish but for this example we will just use a simple box character with eyes.
You can create your own sprites using the sprite editor. To create a new sprite put your mouse over the Choose a Sprite button and then click on the paintbrush.
This create a blank sprite and will open the sprite editor where you can use the tools to create your sprite. You can even create extra costumes for your sprite!
Tip: give your sprite a name so that you can recognise it in the code blocks.
We will create a sprite that has the platforms that our character will move through. This platforms sprite will have multiple costumes and each costume will have a different set of platforms.
For now just create the new sprite and call it 'platform'. Design the first costume with a box that covers all of the bottom of the screen.
In a later step, we will create some more costumes of this sprite with different platforms.
You can create your own sprites using the sprite editor. To create a new sprite put your mouse over the Choose a Sprite button and then click on the paintbrush.
This create a blank sprite and will open the sprite editor where you can use the tools to create your sprite. You can even create extra costumes for your sprite!
Tip: give your sprite a name so that you can recognise it in the code blocks.
You may need to resize your character so it will fit properly in the game. If you do add the following code and play around with the size value until you get your character about the same size as the picture with this step.
Add the following code to your character sprite:
when green flag clicked
set size to [20] %