Scratch allows the creation of projects with a simple button press. Once you create a Scratch project, you're taken into the Scratch development environment. From there, you can add characters, sound effects, and scripts to add animation and interactivity to your projects. In this movie, see how to create a project and get a tour of the Scratch interface.
- [Voiceover] So I've logged into Scratch and I can tell that I'm logged in because it says my username at the top of the screen, and from here I'm going to create a new project. You can do that by clicking the Create button. So once you've gone there, you're taken into the Scratch development interface. Now here I see the name of my project, which is currently untitled. Now let's say I wanted to give this a name. I'll call this My First Project. And just like that, I've saved the name of my project. On the stage here, we have a cat and this is the default project in Scratch.
You have your little cat there. And this is the main working area. So if I were to publish this project and someone were to run it, this is what they would see. Now it wouldn't really do anything because we haven't added any kind of interactivity to it. They would just see a cat. But this is the main working area and this is what users are going to see and this is where we test our apps by clicking that green flag. And of course we'll get more into that later. For now, I just want to introduce that this is the stage.
Now at the bottom we have settings for adding new sprites, which are graphics, so this cat here would be considered a sprite in game development. We could add additional sprites and we can change the background. In Scratch, the background is called a backdrop. So we have settings to change both the backdrop and the sprites. Now in the center of the screen, we have a few different tabs. There's Scripts, Costumes, and Sounds. If I go to Costumes and I have the cat selected, I can see different costumes for the cat.
In animation terms, these are called frames. So when I click on costume2, the cat goes to a different animation frame where he is walking. So I can click back between one and two and make it look like the cat is walking in place. We'll get more to this editing pane later on, but just know that this area on the right is broken up into different tabs and you can click on them and you're going to see something different based on which tab you have selected or which sprite you have selected down here.
In the Sounds tab, we can see a sound. I have this meow sound effect and when I click the play button, the sound effect will play. (cat meows) So I go back over to Scripts. Now we're going to talk about Scripts in a lot of detail later on, but for now, just understand that Scripts are where you apply the animations and interactivity to your apps. You can test out what scripts will do by clicking on them. So for example, there's this script right here that says move 10 steps.
Now I have the sprite selected right here. I can see that it's selected because it has that blue box around it. So I have my cat selected and if I want to test out this move 10 steps script, I can just click on it, and he'll move 10 steps forward. So each time I click, the cat moves forward a little bit. For now, you can just click on these and see what they do, but we're not actually going to build anything in particular just yet. Finally, I wanted to show that there's this toolbar at the top that allows you to modify your objects, like duplicate them, delete them, to make them grow or shrink, and then you also have a help button.
And at the bottom of the screen is the Backpack. Now when I click that button expand the Backpack, that's that little arrow button, so it's down here, you just click it, open it up. I have this Sprite1 here and then I also have another sprite in here, which you probably will not see. The backpack is a place where you can store objects for use in other projects. So let's say you draw something neat and you want to use it in a future project. You can put it in your Backpack and then it's accessible in all of your projects.
We'll look more at how that works later. So for now, this is the Scratch interface. We have the stage, then we have backdrops and sprites over here, and then we have the tabs sections, which control our scripts, costumes, and sounds on the right side of the screen.
He starts with demonstrating how to create your first project and gather the artwork (aka sprites) and other assets you'll need to build it. Todd then reviews the prebuilt scripts, the bits of code that control the logic of your Scratch projects, and explains how to use the different script types for different functions, such as animating sprites, responding to events such as button clicks, and comparing values. In chapter 3, he covers costumes, and in chapter 4, he shows how to load and play sounds. Finally, he shows how to put it all together into a complete web game, which you can then share with the Scratch community.
- What is Scratch?
- Creating your first project
- Choosing a backdrop for your application
- Creating sprites (reusable graphics) in Scratch
- Working with scripts: animating objects, responding to events, and checking logic
- Switching sprite costumes
- Changing the appearance of sprites with custom-drawn costumes
- Playing sounds
- Building a game with Scratch