Skip to content
Transcript

(upbeat music)

Hey and welcome to Scratch Games day six.

In today's club session you'll make a launching game.

While creating this game you'll learn about an important computer science concept, variables.

As well as a game creation concept, increasing difficulty.

In the game you'll make today the player must launch and navigate a sprite across a screen of bouncing enemies.

If the player reaches the finish line a point it added to their score and a new enemy is added to the game.

This game uses variables to make it more difficult.

You may have encountered variables in math class like the x or y you solve for in algebra equations.

Variables in computer science are very similar.

A variable is a storage location for data.

When the code runs, it tells the computer to replace the variable with data from that storage location.

In many sports video games you can easily see the values of some variables.

In a football game each football player might have many different attributes all of which are stored in variables.

In the game, the variable will hold the player's score.

As the players score gets higher the game will get more difficult.

To get started, open the starter project link on this page.

Then, add a sprite that the player can control.

This example project will use a fish but you can use any sprite you'd like for yours.

You will probably want to shrink the sprite to make it a better size for this game.

Once you've done that move on to the next screencast.

(upbeat music)

Instructions

  1. Open the starter project.
  2. Remix and Sign In
  3. Select a player sprite
Attributions
  • "Football-NFL-Madden 15 :: GREATEST PLAYER EVER! :: Vikings Vs. Steelers - Online Gameplay XboxOne" by Golden GS (https://www.youtube.com/watch?v=0sTcAvtQS9M) -- Licensed by Creative Commons Attribution 3.0 Unported (http://creativecommons.org/licenses/by/3.0/) -- Video trimmed to needed length | Audio removed
  • "Linear equation for y=3x+1.png" by Nerfer (https://commons.wikimedia.org/wiki/File:Linear_equation_for_y%3D3x%2B1.png) -- Licensed by CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/deed.en) -- No modifications made