Return to Video

Code your own Flappy Game

  • 0:00 - 0:01
    Hi everyone,
  • 0:01 - 0:07
    One of the most exiting things of a program
    is that it can be interactive.
  • 0:07 - 0:12
    Any time someone clicks, tabs or types something at a computer or phone, that generates a event.
  • 0:12 - 0:16
    and there is some code that decides what to do when an event occurs.
  • 0:16 - 0:20
    For example, you could have an eventhandler that sais
  • 0:20 - 0:22
    "when the mouse is clicked, play a sound".
  • 0:24 - 0:26
    Let's try an activity to see how it works.
  • 0:26 - 0:28
    Have you ever heard of the game Flappy Bird?
  • 0:28 - 0:34
    By using eventhandlers, you can learn how to program
    your very own custom version of Flappy Bird.
  • 0:34 - 0:41
    The code you write involves dragging and dropping blocks,
    that represents commands for the computer.
  • 0:41 - 0:44
    Drag and drop programming is the easiest way to learn...
  • 0:44 - 0:47
    It's even how university students learn how to code.
  • 0:47 - 0:51
    But under the hood, each block is represented by real code.
  • 0:51 - 0:56
    If you take a look at the workspace, there are some green blocks that are filled in for you.
  • 0:56 - 0:58
    These are event handlers.
  • 0:58 - 1:05
    If you want the bird to flap, when you click your mouse, you can do this by attaching the flap-block to the appropriate eventhandler.
  • 1:05 - 1:09
    And now in your game, whenever you click your mouse, the bird will flap.
  • 1:09 - 1:15
    In each puzzle of this activity, we will introduce new types of events as green blocks on the work space.
  • 1:15 - 1:20
    and you can decide the appropriate block to add in responds of these events.
  • 1:20 - 1:24
    When you see a arrow like this, you can change the settings,
  • 1:24 - 1:27
    like the sound to play when the bird touches the ground.
  • 1:27 - 1:31
    In the final puzzle, you will be able to create your own game and share it with your friends.
  • 1:31 - 1:33
    Have fun!
Title:
Code your own Flappy Game
Description:

more » « less
Video Language:
English
Duration:
01:34

English subtitles

Incomplete

Revisions