Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

1. Side Scroller Introduction

Transcript

Hello again, animators!

Welcome to Activity 5 of Google CS First Animation.

In this activity, you will build a side-scrolling game!

As you make this game, you will learn a lot more about conditionals.

If you’ve been in a CS First club before, you know computers use conditionals to make decisions.

In Scratch, the “if” and “if/else” blocks are conditionals.

Computer scientists think a lot about contingencies, which is a fancy word for different things that can happen.

One “if/else” block can handle two contingencies.

If you work at a cool tech company, you wear shorts to work.

Otherwise, you wear dress pants or a skirt.

But those aren’t the only options!

What if you work outside?

You might wear a hard hat.

That’s another contingency.

You can probably think of a lot more.

In Scratch you’d code something like this by nesting conditionals, or by putting multiple “if” blocks together.

That way, you can cover all the contingencies.

Animators think about contingencies too!

They think about the different experiences a character might have, the different ways it can move, and what changes in the story as a result.

Take a look at all the contingencies used in an interactive art display at the Cleveland Museum of Art.

Users can drag an image from another part of the screen.

They can also swipe right or left, or tap an image to display more information.

This activity uses nested conditionals to decide when the character can jump, walk, and animate, and when the ground can move and show.

Open the starter project next to this video, click remix, sign in, then go the next video to start building.

You may see some code in the starter project.

Feel free to look around and tinker with it to understand what it does.

If anything goes wrong, you can just open it back up from this page.

Next arrow_forward
Instructions
  1. Open the starter project.
  2. Click Remix and sign in.