Lesson Plan

Lesson: Alien Catcher
Time: 45+ mins

Introduction

In this lesson, campers will complete fun tutorials and solve an alien-catching puzzle module as they learn how to draw lines, detect color and objects, and make Actors appear and disappear from the Stage. Additionally, they'll create their own alien game and art project! Coding concepts include touching Actor, touching color, and show and hide.

Equipment/Materials

  • Computer, laptop, or tablets (1 per camper)

Code Blocks

  • : Start the program when the play button is selected.
  • : Make the Actor disappear from the Stage.
  • : Make the Actor appear on the screen.
  • : Play the specified sound file and wait until it is finished playing.
  • : Point the Actor at the specified degree.
  • : Move the Actor to the specified x- and y-coordinates on the Stage.
  • : Set how an Actor behaves when it rotates.
  • : Keep repeating the blocks inside this loop forever.
  • : Make the Actor repeat this loop until the condition is true.
  • : If the condition is true, then run the code inside the block.
  • : Move the Actor a specified number of units.
  • : Pause the program for a specific number of seconds.
  • : Make an Actor change direction if it is touching an edge of the screen.
  • : Clear all markings made by the pen or stamp.
  • : Set the pen's color to the specified color.
  • : Set the pen's thickness to the specified value.
  • : Pick up the pen to stop drawing on the Stage.
  • : Put the pen down to draw on the Stage.
  • : React when the specified parameter is detected.
  • : Rotate the Actor to the right (clockwise) by a specified amount.

Vocabulary

  • Coding: Using a computer language to tell the computer what to do
  • Sequence: The order in which steps or events happen
  • Actors: Tynker characters and objects that can talk and interact with each other
  • Command: A specific action or instruction that tells the computer to do something
  • Loop: An action that repeats one or more commands a specific number of times
  • Infinite loop: A loop that repeats forever and does not end until the program stops
  • Condition: A logical expression that evaluates to true or false
  • Conditional statement: A type of statement that executes different parts of the code based on whether a logical expression evaluates to true or false

Objectives

Students will...
  • Use code blocks to program Actors to detect other Actors, color, and when touching the edge of the screen
  • Make Actors appear and disappear from the Stage
  • Apply coding concepts to solve a puzzle
  • Create Get the Enemy and Pattern Maker projects

Getting Started (5 minutes)

  • Ask campers, "In video or computer games, what happens when a character touches another object or character?" Next, ask if anyone can think of a game scenario where one character touches another character or object and it triggers something to happen. (Examples might include collecting powerups, jumping on bad guys, reaching the goal, and so on.) Explain that in this lesson, they'll learn how to program Actors to react when touching specific colors, other Actors, or the edge of the screen.

Activities (45 minutes)

Facilitate as students complete all Alien Catcher modules on their own:
1. Concepts (Video)
  • A friendly superhero introduces three coding concepts:
    • Touching Actor - Campers will watch an example of the superhero saying "hi" to Codey when they run into each other. Next, they'll see the code blocks that made the superhero say "hi" to Codey.
    • Touching Color - Campers will watch Codey demonstrate how the “touching color” block checks if an Actor is touching a specific color.
    • Show and Hide - Campers are provided "show" and "hide" code blocks. Make sure they click the code blocks and observe how they affect the jet.
2. Attack the Alien (Tutorial)
  • In this tutorial, campers will learn how to program an alien to scream when it touches a dinosaur.
  • Coding activities include adding a desert background, a dinosaur named Rex, and an alien to the Stage; adding a sound to the alien; programming the alien to play a sound when it touches anything (including another Actor); making the alien visible when the program starts; and programming the dinosaur to start at a specific location and move.
  • Make sure campers are reading the instructions carefully. Were they able to program the dinosaur to move towards the alien and bounce off the edge of the screen? Did the alien scream when the dinosaur ran into it?
3. Trap the Ship (Tutorial)
  • In this tutorial, campers will learn how to draw lines around an Actor to trap it.
  • Campers will need to code the good guy ship and bad guy ship Actors:
    • Good guy ship coding activities include: positioning the Actor on the Stage, setting the pen color and size, programming the good guy ship to follow the mouse-pointer (for web)/touch location (for mobile) using a "forever" loop, and programming the pen to draw on the Stage.
    • Bad guy ship coding activities include: positioning the Actor on the Stage, making it move, and programming it to detect if it's touching a purple line.
  • After campers finish programming their project, ask them to test it out. Were they able to draw lines around the bad guy ship Actor? Did the bad guy ship detect when it was touching the purple line and bounce off in a random direction?
4. Trap the Aliens (Puzzle)
  • To solve this puzzle module, campers need to program the robot to move and draw lines around the aliens to trap them. Can they trap all three aliens within 30 seconds?
  • Give a hint: Ask campers…
    • What does the robot need to do? (Answer: The robot needs to be programmed to always follow the mouse-pointer [for web] or touch location [for mobile] using the "forever" code block.)
    • How can we get the robot to draw lines? (Answer: We need to program it to detect when the mouse is held down [for web] or when the user is dragging their finger on the screen [for mobile].)
5. Get the Enemy (DIY)
  • In this DIY (do-it-yourself) project, campers will follow step-by-step directions and apply what they've learned so far to create their own alien capturing game!
  • Step 1 of the tutorial provides a completed example.
  • Activities include adding a background, adding Actors, programming the Actors to draw lines as they move, and making the Actors react when touching a specific color.
  • If campers finish early, ask them to add sound, draw their own Actors, or show their project to a neighbor.
6. Pattern Maker (DIY)
  • Campers will watch an example of a Space Master Actor drawing a colorful design. Next, they'll explore different code blocks and see how it affects the Space Master.
  • Encourage campers to explore and create shapes, patterns, and designs! If campers finish early, ask them to show their art to a friend.

Wrap-Up

Unplugged Activity: Discussion
Review today’s coding adventure by leading a discussion. Ask campers:
  • What are some things we can program Actors to detect? (Answer: We learned how to program Actors to detect colors, other Actors, and if they're touching the edge of the screen.)
  • Who can think of another game or project idea that would use the "touching Actor" and "touching color" code blocks?
This course is not part of your plan. Please upgrade to view all answer keys

Class Presentations

These student-facing slide presentations help educators seamlessly run Tynker lessons in a virtual or physical classroom setting. Each lesson has its own set of slides that introduce the big ideas, suggest unplugged activities, and include a section for each activity module. While running lesson slides, you can switch back and forth between the activity, the slides, answer keys and other lesson materials.
A sample slide presentation is available for your review. Please log in to view all the class presentations available with your plan..
Lesson 1
Introduction
40 Slides
Lesson 2
Lights, Music, Action
23 Slides
Lesson 3
Frame-based Animation
26 Slides
Lesson 4
2D Motion
23 Slides
Lesson 5
Pen Drawing
23 Slides
Lesson 6
Alien Catcher
26 Slides
Lesson 7
Space Breaker
22 Slides
Lesson 8
Fish Tank
19 Slides
Lesson 9
Make Games - Animated Greeting Card
17 Slides
Lesson 10
Make Games - Music Video
15 Slides
Lesson 11
Make Games - Maze Game
18 Slides
Lesson 12
Make Games - 2-Player Battle Game
17 Slides
Lesson 13
Make Games - Animated Story
16 Slides
Lesson 14
Level Design
23 Slides