Lesson Plan

Lesson: Message Driven Programming
Time: 60+ mins


Who's ready for a dance party! In this lesson, students will learn the difference between broadcasting a message and sending a message to a specific Actor. Additionally, students will learn how to handle multiple messages between Actors and will change the tempo for the drum beats as they create fun projects that make Actors dance/perform different animations. The last module is a multiple-choice quiz that reviews concepts from this lesson. You can find quiz and module solutions in the "Answer Key" section of this teacher guide.

Code Blocks

  • : Run the code attached to this block when the Play button is clicked.
  • : Run code attached to this block when you press a specified key.
  • : Keep repeating the blocks inside this loop forever.
  • : Repeat blocks inside this loop a specified number of times.
  • : Pause the program for a specific number of seconds.
  • : Broadcast a message to all Actors in the program.
  • : Send a message to an Actor, with the specified parameters.
  • : Listen for a message or broadcast from other scripts before activating.
  • : Play the specified sound file and wait until it is finished playing.
  • : Change the costume of the Actor.
  • : Change the Actor's costume to the specified one.


  • 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 over and over
  • Infinite loop: A loop that repeats forever and does not end until the program stops
  • Costume: Different appearances for an Actor, such as poses used in a character’s animation
  • Animation: Changing costumes (pictures) of an Actor many times to give the illusion of movement
  • Tempo: The speed or pace of music, how fast the music plays


Students will...
  • Apply coding concepts to program Actors to do different animations based on the messages they receive.
  • Use code blocks to send and receive messages


  • Computers, laptops, or mobile devices (1 per student) with student account access to Tynker.com

Warm-Up (15 minutes)

Prepare students for today by explaining the difference between the "send message" and "broadcast" code block. Inform them that the "send message" block sends a message to one Actor, whereas the "broadcast" block is used to send a message to all Actors on the Stage. Check for understanding by asking students…
  • If you want to send a message to just one Actor, which code block should you use? (Answer: "send message")
  • If you want to send a message to all Actors, which code block should you use? (Answer: "broadcast")
Note: They'll need to know this for the quiz.

Activities (45 minutes)

Facilitate as students complete all Message Driven Programming modules on their own:
1. Introduction (Video)
  • Students will view a short video that describes how using the "switch to costume" block with the "repeat" block can make an Actor have different animations.
2. BeatBot Dance Example (Example)
  • Students will view an example of a project where the BeatBot throws a punch when the "punch" button is pressed.
3. BeatBot Dance (DIY)
  • In this DIY (do-it-yourself) project, students will follow step-by-step directions to learn how to program the BeatBot to punch when a button Actor is pressed.
  • Activities include programming the button Actor, adding music and sound, and animating the BeatBot, sending messages, and using code to make Actors respond to messages.
  • Did students finish early? Direct their attention to the bonus section on the last page of the tutorial which encourages students to add another button Actor that makes the BeatBot run! Note that students are provided the necessary code blocks in this bonus activity.
4. Dance Moves (Puzzle)
  • To solve this puzzle module, students will need to make the BeatBot perform three different dances!
  • Optional: Explain the code attached to the "when I receive jump" block. Tell students that when the message "jump" is received, the BeatBot switches to the next costume in the jump costume series. This is repeated 7 times, and then the costume is switched to "stand" which makes the BeatBot stand still.
5. Add Tempo Example (Example)
  • Students will view a sample project where pressing buttons changes the tempo!
6. BeatBot Dance (DIY)
  • In this DIY project, students will program a drum beat that speeds up and slows down based on the user’s input!
  • Students can change the tempo of the beat using messaging.
  • Did students finish early? Direct their attention to the bonus section on the last page of the tutorial which encourages students to program a complex beat in the background.
7. Quiz (Multiple Choice)
  • Students will answer 5 multiple choice questions to review concepts covered in this lesson.

Extended Activities (10 minutes)

Discuss the following with students:
  • Which activity did you find most challenging?
  • How would you describe “coding” to a random student who doesn’t know what it means?
  • How did you apply messaging code blocks in today's coding adventure?
  • Which code block lets you play music?
  • How do you send a message to a specific Actor?

U.S. Standards

  • CCSS-Math: MP.1
  • CCSS-ELA: RF.1.1, RF.2.4, RF.2.4.A, RF.3.4.A, RF.4.4.A, RI.2.6
  • CSTA: 1B-AP-10, 1B-AP-11, 1B-AP-15
  • CS CA: 3-5.AP.12, 3-5.AP.13, 3-5.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
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
27 Slides
Lesson 2
Loops and Animation
19 Slides
Lesson 3
Creating a Scene
21 Slides
Lesson 4
Jumping over Obstacles
20 Slides
Lesson 5
23 Slides
Lesson 6
User Interaction
19 Slides
Lesson 7
Guessing Game
22 Slides
Lesson 8
20 Slides
Lesson 9
Alien Invaders
17 Slides
Lesson 10
Music and Animation
18 Slides
Lesson 11
Instruments and Tempo
19 Slides
Lesson 12
Broadcasting Messages
18 Slides
Lesson 13
Time Limits
17 Slides
Lesson 14
Message Driven Programming
18 Slides
Lesson 15
Pop the Balloon
18 Slides
Lesson 16
Animation with Movement
18 Slides
Lesson 17
Obstacle Course
19 Slides