[Welcome to the Hour of Code...]
(Star Wars musical theme)
Hi! I'm Kathleen Kennedy and I'm the
producer of Star Wars The Force Awakens.
Today you'll be working with one of our
stars, BB-8: BB-8 is a spherical droid,
Everything he does and every movement he
makes is controlled by computer software.
Computer science impacts every industry
from marketing to healthcare to film.
In fact, hundreds of computer engineers
work together
to make a film like "The Force Awakens."
Hi, I'm Rachel Rose,
I'm the senior R&D engineer at ILM
and I lead the animation and creature
development team.
In The Force Awakens I'm responsible
for helping me artist develop rigs
which are the parts of the character
that move,
that allow the character to look very
believable in a galaxy far far away.
In the next hour we're gonna build our own
Star Wars game
that will teach you the basic concepts
of programming.
Usually programming is all text
but we're going to use blocks here
so that we can drag and drop to
rate the programs (check)
Under the hood
you're still creating code.
After you try the basics with blocks,
we'll switch you to JavaScript,
one the most popular programming languages
on the web.
To start off, we're going to work with Ray
to program BB-8 to walk
to collect all of the scrap parts.
Your screen is split into three parts:
on the left is a Star Wars game space
where code will run.
The instructions for each level
are written below the game space.
This middle area is the
tool box and each of these boxes
is a command that BB-8 can understand.
The white space on the right
is called the workspace
and this is where we're going
to build our program.
if I drag the "Move left" block to our
workspace and press run, what happens ?
BB-8 moves left one block on the grid.
And what if I want BB-8 to do something
after the "move left" block?
I can add another block to our program.
I'm going to choose
the "move up" block
and I'll drag it underneath
my "move left" block
until the highlight appears
and then I'll drop it
and the two blocks will snap together.
When i press "run again"
BB-8 will ... (check) the commands
that are stacked
from top to bottom on our workspace.
if you ever want to delete a block,
just remove it from the stack
and drag it back into the tool box.
After you've hit "Run", you can always
hit the reset button to get back to start.
Now let's get rolling