Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Code your own Flappy Game

Get Embed Code
9 Languages

Showing Revision 1 created 07/13/2015 by Thijs de Haan.

  1. Hi everyone,
  2. One of the most exiting things of a program
    is that it can be interactive.
  3. Any time someone clicks, tabs or types something at a computer or phone, that generates a event.
  4. and there is some code that decides what to do when an event occurs.
  5. For example, you could have an eventhandler that sais
  6. "when the mouse is clicked, play a sound".
  7. Let's try an activity to see how it works.
  8. Have you ever heard of the game Flappy Bird?
  9. By using eventhandlers, you can learn how to program
    your very own custom version of Flappy Bird.
  10. The code you write involves dragging and dropping blocks,
    that represents commands for the computer.
  11. Drag and drop programming is the easiest way to learn...
  12. It's even how university students learn how to code.
  13. But under the hood, each block is represented by real code.
  14. If you take a look at the workspace, there are some green blocks that are filled in for you.
  15. These are event handlers.
  16. 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.
  17. And now in your game, whenever you click your mouse, the bird will flap.
  18. In each puzzle of this activity, we will introduce new types of events as green blocks on the work space.
  19. and you can decide the appropriate block to add in responds of these events.
  20. When you see a arrow like this, you can change the settings,
  21. like the sound to play when the bird touches the ground.
  22. In the final puzzle, you will be able to create your own game and share it with your friends.
  23. Have fun!