Quantcast

Start with 7 free days of training.

Gain instant access to our entire IT training library, free for your first week.
Train anytime on your desktop, tablet, or mobile devices.

Learn to program from Scratch - no experience required!

This course will be retired in 293 days. If you have questions, please contact us.

This Scratch 2.0 Programming video training course from Tim Warner covers all you need to know to learn the fundamentals of computer programming by using the fun and easy-to-use Scratch 2.0 development environment....
This Scratch 2.0 Programming video training course from Tim Warner covers all you need to know to learn the fundamentals of computer programming by using the fun and easy-to-use Scratch 2.0 development environment.

Related Area of Expertise:
  • Programming Level 1

Recommended skills:
  • An interest in computers and in making computer programs
  • Basic mathematics (addition, subtraction, multiplication, division)

Recommended equipment:
  • An Internet-connected computer
  • A recent Web browser with the Adobe Flash plug-in installed

Related job functions:
  • Entry level programmer
  • Game designer


Scratch 2.0 is a programming language and development environment created by the educators at the MIT Media Lab in Cambridge, MA, USA. Scratch's drag-and-drop nature make it an ideal way to learn the basics of computer programming. To that end, Scratch is used in K-12 schools and colleges all over the world to get people interested in computer programming.
In this training course we assume nothing with respect to your programming background. By the conclusion of the course you'll know how to use Scratch to create games, interactive stories...the proverbial sky is the limit! Have fun while you cultivate an interest and aptitude in programming.
 show less
1. Understanding Scratch (21 min)
2. Getting Warmed Up (24 min)
3. Setting the Stage (20 min)
4. Defining the Player Controls (22 min)
5. Implementing Game Logic (20 min)
6. Adding Gameplay Complexity (19 min)
7. Dressing Up the Game Screens (17 min)
8. Finishing Up Our Game (20 min)
9. Publishing and Maintaining Our Game (19 min)
10. Remixing Other Scratchers' Work (18 min)

Understanding Scratch

00:00:00

Hi there. Welcome to the CBT Nuggets training series on learning to program with Scratch 2.0. The name of this introductory Nugget is Understanding Scratch. My name is Tim Warner, and I'm happy and grateful to be your instructor. If you haven't yet played with Scratch, you're in for a real treat.

00:00:17

As we're going to learn in more detail in just a moment, Scratch is a programming environment that's optimized, believe it or not, for children. Although, if you're an adult watching this, please don't be insulted in any way, shape, or form. Because Scratch includes a toolbox that, while it may be accessible to kids, it's equally usable for adults.

00:00:37

You can actually build some really cool games and other interaction type programs with the Scratch tools. So to that point, let's go over our learning objectives for this first Nugget. First we're going to formally define what Scratch is, who made it, does it cost anything, what devices can I run scratch on, when I build a Scratch program, who can see those projects?

00:01:00

We'll answer all those questions. In so doing, we'll need to have a brief conversation about the cloud. This is definitely a 21st century information technology term. You probably interact with the so-called "cloud" every day. Of course, I'm not talking about clouds in the sky.

00:01:18

This is a metaphor for how information technology offers data to people nowadays. Anyway, more on that in a little bit. We'll finish with a demonstration on Scratch 2.0. And I'll get you comfortable with the website, with registering a user account, opening up the Scratch editor, and getting the lay of the land.

00:01:38

Now, I'm assuming that you are brand new to Scratch. If you've used the previous version of Scratch, version 1.4, I'll make sure to point out the big differences and learning curve issues as we go along. Come on. This is some fun stuff. Let's get started.

00:01:54

So what is Scratch? Scratch, formally defined. It is a software development environment. Scratch belongs to a group at the Massachusetts Institute of Technology, or MIT. They have a department, a Media Lab actually, on their Cambridge, Massachusetts campus.

00:02:11

And in the Media Lab there is a division called the lifelong kindergarten group. We'll go to their website in just a moment. And they have many projects. Their focus or their mission is to make technology as easy to use as possible. The focus for them anyway, primarily, is teaching kids.

00:02:28

And by kids I'm referring to K-12 students, 18 years old and younger. To teach them, to get them interested in creating computer programs, to teach them how to create computer programs, et cetera. But as I said, don't be put off if you're a young adult or a full fledged adult.

00:02:44

Because Scratch makes it really easy for anybody, whether or not you think you have a capacity or aptitude for computer programming, to invent project ideas. Anything. It could be a game. It could be an interaction that shows concepts or history. Maybe you're developing a project for school.

00:03:04

And you can use Scratch to create an interaction around that. Whatever. The sky is the limit. You can invent these ideas and make them happen quickly without the burden of learning syntax. Syntax refers to the actual rules behind programming languages.

00:03:20

You'll find that Scratch uses this metaphor of the block. They're sort of like LEGO blocks, actually. And Scratch hides a lot of the under-the-hood complexity that normally scares people away from computer programming. Let me give you a good example to show you what I mean.

00:03:36

Check this out. What we're doing here is showing the same procedure in a traditional programming language, C specifically. And then down at the bottom we're showing the same thing in Scratch. Now, just spending a moment to look at that C code, can you tell me, with any degree of certainty, what's going on?

00:03:55

Now, if you're good with math out of the box, then you probably can figure it out by looking at some of these operators. The equals sign, the greater than sign. And even if you're not a math whiz, you might recognize some of the English keywords. "If" and "else." You're probably thinking, well, there's some kind of test or condition going on here.

00:04:14

And you'd be right to think that. Printf, you'd probably think, well, I don't know what the f means. But "print" tells me it's probably going to print something on screen. And again, that would also be correct. But you notice that you have to get past the syntax rules before you can start doing anything with most programming languages.

00:04:33

By contrast, Scratch is really intuitive. Because we have these color coded blocks. Each set of blocks is aligned to a particular type of programming task. You don't need to know the technical names behind any of that stuff. We'll get to that eventually.

00:04:48

If you enjoy this series and find yourself very into it, we're doing a series and Python programming that serves as the next level to what we're doing here with Scratch. And there we'll get into formal terminology like looping, and branching, conditional logic.

00:05:03

All of those formal terms do need to eventually come into our conversation. We just don't need them right now. But anyway, let's look at the Scratch code and see how intuitive it is. This stack of blocks says that when the green flag is clicked-- and we're going to learn that the green flag is the traditional way to start a Scratch program-- we're setting something, whatever testnum is, to a value of 6.

00:05:26

And then we're running a test, that if that testnum is greater than 6, we want to say to the user, greater than 6. Otherwise if test number is not greater than 6, it will say in range. I hope that the Scratch way of doing this is a little bit easier to understand than C. That's the general idea, anyway.

00:05:48

You'll also find, and I'll repeat this a lot through the training, that with programming there's several different ways to accomplish any particular task. The ways that I show you throughout this training may be good. But in your work with Scratch, you may find a better or great way to solve the problem.

00:06:05

So know that it's not a binary. That is to say a good, bad, yin, yang, true, false, opposite kind of thing. That programming is about shades of gray. And some code works better than other code to do the same thing. Before we get into the demo, we need to briefly discuss what this cloud thing is.

00:06:24

Because cloud computing, as I said at the opening of this Nugget, is huge in computer science, information technology, et cetera. All the cloud refers to, friends, is your information. Your data stored on somebody else's computers in addition to your computer at home, or instead of your computer at home.

00:06:43

Some simple examples. If you use iTunes with your iPod Touch, or your iPhone, whatever you might have, Apple has a technology called iTunes Match, where you can upload your iTunes music to this so-called cloud. But really what's happening behind the scenes is that your music is getting copied up to a server, actually many servers.

00:07:04

Servers are just special purpose computers. They're very powerful computers that do work on behalf of other people. And then the idea is, wherever you are in the world, you may have a new iPod Touch that you just bought. And instead of having to plug into your home computer and download all of your music, you can capture that music by downloading it directly from your account on the iTunes Match cloud.

00:07:29

Similarly, Dropbox is a great file sharing service where you can store your pictures, your music files, your document files. And then get to those files from wherever you are in the world as long as you have an internet connection. So the cloud actually is very, very convenient.

00:07:44

Now, this relates to Scratch. Because in Scratch 2.0 that was released during the summer of 2013, Scratch now stores all of our project data in the cloud on their servers. And by the way, the whole notion of the cloud, it's a metaphor. In other words, it's a way to describe something using terms that are not exactly what you're talking about.

00:08:07

In other words, we're talking about computer data, aren't we? We're not talking about putting a physical kite up into the sky. Or flying an airplane through physical clouds. Instead, we're looking at our own computer. And again, this could be our iPhone.

00:08:22

It could be our laptop or whatever with its data stored on the hard drive. And then when we store a copy of that data up on somebody else's server, like the Scratch website-- if I can spell-- just like you can't see anything from the ground behind the clouds, the clouds represent an abstraction layer, don't they?

00:08:39

They're pretty to look at, they're fluffy, but we don't have to understand how they work to know that they exist. And we don't have to know that although we can't see the sun, the sun is behind those clouds that are hiding it. The same idea with our data.

00:08:53

Our data's up in the cloud. We don't see the specifics of how it's being stored. We just know that it's there and we can get to it. Now, the main advantage of this cloud stuff with Scratch is that we can get to our projects from wherever we are. And also we don't have to install anything.

00:09:08

Scratch 2.0 runs in your web browser. So you don't have to take the extra step to download and install a program before you can start using it. Disadvantage of this cloud approach is that you have to be online in order to get to your stuff. Now, the Scratch team does say on their website that they're developing an offline editor.

00:09:27

That should be available later in the summer in 2013. Hopefully by the time you're watching this lesson you can download an offline editor. And that will enable you to work in Scratch without having an internet connection active. Allrighty then. Let's hop into our demo.

00:09:42

We're going to go out to the MIT Media Lab site, just so we can see where the project-- where the Scratch project, I should say-- comes from. We're going to get our bearings at the scratch site and create an account. It's very, very important that you create a Scratch user account so you can become part of the community.

00:09:59

And then, as promised, we're going to explore the Scratch 2.0 User Interface, or UI. There's a technical term for you. UI simply represents what the program looks like to you, the user. And how easy it is for you to actually use the program. The goal is to always create a program that has a really user friendly UI.

00:10:19

My three-year-old daughter Zoe can zip on an iPhone or an iPad because Apple has done a genius job in building a user friendly UI. Allrighty, here we are online. This is the MIT Media Lab's website if you're interested. It's www.media.mit.edu. Just to let you know, Massachusetts Institute of Technology is one of the world's leading centers for computer science.

00:10:45

So lest you think to yourself, this Scratch is an insult to my intelligence. What the heck is this with blocks? Know that the people who invented this are among the world's leading computing professionals. The lifelong kindergarten group who owns and actually creates the Scratch environment is at llk.media.mit.edu.

00:11:06

And if you visit their Projects page, you'll see the very first project is Scratch. Now, that serves as an entree. The main Scratch project page that you should bookmark and always have at your ready reference is scratch.mit.edu. And this is their new site.

00:11:23

I say "new" because, as of this recording in May 2013, the Scratch team completely redid their website. And they completely rebuilt the Scratch application as a whole. It used to be Scratch version 1.4. And it was a separate program that you had to download and install on your computer to use.

00:11:41

Now, as I said, we have this notion of cloud computing where all of your work is stored online. Now. like I said, you're not going to be able to download anything in terms of-- Now like I said, you're not going to be able to get very far in the Scratch community until you've joined.

00:11:56

So you notice in the upper right, we have a button called Join Scratch? Really important to do this. So I'm going to create an account now. And you notice it says, don't use your real name. So for privacy purposes, think of a good unique Scratch username.

00:12:09

Put in a strong password and remember it of course. And then we can click Next. It asks you for your birth information. If you're not comfortable giving them honest to goodness information, you can put dummy information there. I'm going to just put some semi true, semi false information in there.

00:12:25

Your country, and your email address. Let's click Next, and that's all there is to it. We have some links on how to build a project, build off of a starter project, connect to another Scratcher. By the way, a Scratch community member is called a scratcher, just to let you know.

00:12:41

Let's click OK. Let's go, and we're now logged in. You'll see when we're logged in, we have a menu here where we can get to our Profile page where you can fill in detail about yourself. You can upload a picture or an avatar, whatever you want to do. My Stuff is particularly important, because this is where your projects will be stored.

00:13:01

You notice here on the left side of My Stuff we have All Projects, Shared Projects, Unshared Projects. So basically, when you build a project it's private by default. And you can, it's encouraged actually, to share it with the Scratch community. And they can actually build a remix off of your project and give you credit.

00:13:19

Vice versa, you can do the same thing with other people's stuff. We'll get to more about this later as we keep going, we have an Account Settings page, and we can sign out. This is a direct link to your My Stuff area. That's why they put it in a separate button, because it's so frequently used.

00:13:35

And there's also a messaging system where you can see announcements. Online help has gotten to-- if that's a correct word-- by clicking Help. And there's a lot of cool stuff here. There's tutorial links, there's movies. I encourage you to spend time here to supplement the training you're receiving from me.

00:13:51

The Explore area is where you can look at other people's work. And when you click somebody's project, it goes to their page. When you share a project on the scratch site, you get your own dedicated page. And you'll notice here-- this has always been a really cool aspect of Scratch-- you can try out these games and interactions directly in your web browser.

00:14:13

Now that brings up an important point. You cannot use the Scratch editor or run Scratch programs from tablet devices. So if you have an iPad or a Galaxy Tab, whatever, you're out of luck. You have to have a full fledged computer. So whether it's a PC, a Windows 7 or Windows 8 laptop or desktop computer, that's fine.

00:14:34

If it's a MacBook laptop or an iMac Macintosh computer, or if it's a computer running Linux. The requirements are that you have a fairly recent version of a web browser, like Internet Explorer, like Google Chrome, Mozilla Firefox. And you also-- this is most important-- have to have the Adobe Flash Player installed on your system.

00:14:56

Now, something like 99% of the world has the Adobe Flash plug-in already installed, but I'll put up a link for you to go to if you're unsure that you can check and make sure. Actually, Scratch site will tell you immediately if you don't have flash installed.

00:15:11

Now check this out. Look at the See Inside button. You can not only try out somebody's project in the browser, but you can actually dip into it and see exactly how the person built the project. And you can make changes and test those changes all within the browser.

00:15:28

Isn't that amazing? You can come back to the Scratch homepage by clicking the Scratch icon in the upper left. Let's complete this Nugget with a demonstration, a quick walkthrough, of the Scratch editor user interface. This first button here, Create, with one click takes you into the editor.

00:15:44

And I'm going to just give you a quick overall tour here. We have first of all the menu bar where we have, as I just showed you. A link to the Scratch homepage. The second button allows you to localize the program, or change it to your language if it's not English.

00:15:59

The File menu enables you to create new projects, save your work. Again, it's to the cloud. You can also download a copy of your project to your computer if you want to take a copy offline from the cloud. Or if you have an offline copy that you want to put up on the cloud, you can choose upload Revert means that you can set your project back to the way it was when you started it.

00:16:19

The Edit menu allows you to change the stage from small to regular. And also adjust the execution speed. And then Tips is actually not a menu, but a button that brings out this guy over here, this Tips thing that can be brought out a couple different ways.

00:16:34

There's a question mark that's just offscreen that you probably don't see that you can click. And this allows you to dip into how to use Scratch. And a lot of it hasn't been completed yet. For instance, if I come down to more blocks and expand it, it says, coming soon.

00:16:49

There are some rough edges, some small rough edges, to Scratch 2.0 as I record this for you simply because it's brand spanking new. And the Scratch team hasn't had time to fill in all of the help files yet. Let's see, what else do we have? Well, moving across here on the toolbar, you can quickly duplicate sprites.

00:17:07

A sprite is simply a graphic object like the Scratch cat that shows up on your stage. The scissors allows you to delete or remove objects. We can grow or shrink sprites. And another way to get help. This is called block help. And what you do is you click the question mark.

00:17:24

And then you hover over the block that you want help on. Click again and it brings out help for that object. Over on the right we have quick access to our drop down menu that we discussed earlier. And this little "saved" indication gives us some security knowing that the work we've done to this point is saved on the cloud.

00:17:43

Now, in the upper left corner we have the ability to name a project. Untitled is the default. This guy here on the left allows you to switch the view from full screen to showing just in the corner of the screen. To green flag is how you start a project.

00:17:57

The stop sign is how you manually stop a project. The sprites that you use on the stage show up down here in the sprites area. This is the sprites list. And you can click the little i to rename a sprite, to get its location on the stage, to rotate it, all that good stuff.

00:18:12

The stage is the backdrop or the background. And you can have more than one backdrop to give your program more flexibility. In the middle part of the screen we have the Blocks Palette, as it's called. And we have three tabs to that pallet. The scripts are where the actual blocks go.

00:18:30

And you can just drag and drop these out with your left mouse button. We'll get into what each block and block type means later in the course. Suffice it to say, this is your primary toolbox for building Scratch programs. The Costumes area is where you can customize a selected sprite.

00:18:45

You can give a sprite multiple costumes. For instance, the Scratch cat, which is our default sprite whenever we create a new project, has two costumes associated with it. And if I click them back and forth, it gives the illusion of animation. This is how we create animation in Scratch.

00:19:02

It's an old cartooning technique where you just have multiple images that are slightly changed. And when you run them one right after the other it gives the appearance of motion. We also have a Sounds palette with a default built-in sound. And a nice wave form and all this.

00:19:18

You can record your own sounds. We can tap into the microphone. You can bring in or import sounds from a file. Or you can choose from a built-in library. There is an enormous library of assets, of sprites, of sounds, of backdrops that you can take advantage of.

00:19:35

And you know what the coolest thing is, everyone? The fact that everything in Scratch is free and shareable. It's what's called open source community. When we build projects we share them with other people freely without charging them money. They can go into our projects and examine our source code.

00:19:53

They can make changes and republish a copy of our project, of course giving us attribution or giving us credit. And everybody benefits from this rich information interchange. That is one of the greatest beauties in my opinion of Scratch. So there you have it.

00:20:08

That's the basic user interface here. And we'll be getting much, much more into this interface. Broader and deeper into it, as we move along with the series. [MUSIC PLAYING] Understanding Scratch review. In this Nugget we defined what Scratch is. You should have a really good idea as to what the purpose of Scratch is and how it fosters us learning how to program computer games while having a great deal of fun.

00:20:41

I hope that you're excited about the creative possibilities. And you're not scared off by some of the traditional fear points that people have. Like, oh boy, if I don't know complex math there's no way I can learn to program. Or, I'm just not interested in learning all these wacky keywords and syntax structures.

00:21:00

Don't worry about any of that. Concentrate on having fun. We covered what the cloud is. And that discussion was important because Scratch 2.0 relies upon the cloud to store our data. I hope now you're also comfortable with the Scratch website. You have a general flavor on how the site is navigated.

00:21:18

You should now have your Scratch user account created. And you know how to get in and out of the Scratch 2.0 editor. We're going to keep building on our skills. And I hope you're as excited as I am. Because this is really awesome. With that, I hope that this has been informative for you.

00:21:32

And I'd like to thank you for viewing.

Getting Warmed Up

Setting the Stage

Defining the Player Controls

Implementing Game Logic

Adding Gameplay Complexity

Dressing Up the Game Screens

Finishing Up Our Game

Publishing and Maintaining Our Game

Remixing Other Scratchers' Work

Please help us improve by sharing your feedback on training courses and videos. For customer service questions, please contact our support team. The views expressed in comments reflect those of the author and not of CBT Nuggets. We reserve the right to remove comments that do not adhere to our community standards.

comments powered by Disqus
Entry 3 hrs 10 videos

COURSE RATING

Training Features


Practice Exams
These practice tests help you review your knowledge and prepare you for exams.

Virtual Lab
Use a virtual environment to reinforce what you are learning and get hands-on experience.

Offline Training
Our iOS and Android mobile apps offer the ability to download videos and train anytime, anywhere offline.

Accountability Coaching
Develop and maintain a study plan with one-to-one assistance from coaches.

Supplemental Files
Files/materials that supplement the video training.

Speed Control
Play videos at a faster or slower pace.

Bookmarks
Included in this course
Pick up where you left off watching a video.

Notes
Included in this course
Jot down information to refer back to at a later time.

Closed Captions
Follow what the trainers are saying with ease.