< Return to Video

Play Lab Hour of Code - Events

  • 0:00 - 0:06
    Now, we're going to learn about something
    that all game programmers use everyday. They're
  • 0:06 - 0:12
    called events. An event tells your program
    to listen for when something happens. When
  • 0:12 - 0:18
    that thing happens, it performs an action.
    Some examples of events are listening for
  • 0:18 - 0:23
    a mouse click, an arrow button, or a tap on
    the screen. Here, we're going to make the
  • 0:23 - 0:28
    space bot greet the earthlings when a player
    clicks on him. We'll use the "when clicked"
  • 0:28 - 0:32
    block and attach the "say" block to it. When
    the player clicks on the space bot, everything
  • 0:32 - 0:37
    attached to this "when clicked" event block
    will be performed. What does your alien say?
  • 0:37 - 0:42
    There are also "when arrow" blocks. If you
    link the "move" blocks to these, you can start
  • 0:42 - 0:49
    to move your actors up, down, left, or right.
    Step by step, your game is getting more interactive.
  • 0:50 - 0:54
    For me, part of the reason I wanted to start a game company was because I wanted to make games
  • 0:54 - 0:58
    I wanted to create something that people could love, play and enjoy
  • 0:58 - 1:04
    My advice for kids who want to do things and learn computer science, just start doing stuff.
  • 1:04 - 1:08
    Start playing around. And maybe if you're a little insecure or a little afraid, that's okay.
  • 1:08 - 1:13
    Find a friend who maybe has a little more experience. Look at video tutorials.
  • 1:13 - 1:19
    Just jump in there and try to create something. Even if you might be like, "Is this a little cheesy?"
  • 1:19 - 1:24
    Or even if you want to look at it and say "Well I could just go play that somewhere else."
  • 1:24 - 1:29
    The act of trying to create something in your own vision is an amazingly fun experience
  • 1:29 - 1:33
    and I just encourage people just to DO stuff. That's really the most important part.
Title:
Play Lab Hour of Code - Events
Video Language:
English
Team:
Code.org
Project:
Hour of Code
Duration:
01:34

English subtitles

Revisions