Programming 201 Lesson Plan

Lesson: Obstacle Course
Time: 60+ mins

Introduction

In this lesson, students will create cool projects that highlight the “pick random,” “point toward,” and “if on edge, bounce” code blocks while reinforcing coding concepts from previous lessons. Additionally, students will create a project that simulates a car chase and will create their own obstacle course game!

New Code Blocks

  • None

Vocabulary

  • None

Objectives

Students will...
  • Use code blocks to program Actors to move randomly across the Stage and bounce off the edge
  • Use code blocks to program Actors to follow a mouse pointer (web) or touch location (mobile)
  • Create an obstacle course game

Materials

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

Warm-Up (15 minutes)

  • Ask students to raise their hand if they’ve experienced or seen an obstacle course. What obstacles (e.g., bridge, tires, cones, walls) did the course use? Point out that the more challenging an obstacle course is, the more fun it can be!
  • Tell your students that they’re going to use Tynker to create their own obstacle course game in today’s lesson!

Activities (45 minutes)

Facilitate as students complete all Obstacle Course modules on their own:
1. Bouncing Ship Example (Example)
  • Students will view a project of a ship that moves across the screen, but bounces when it hits the edge of the Stage.
2. Bouncing Ship (DIY)
  • In this DIY (do-it-yourself) project, students will program a spaceship to bounce back and forth between the left and right sides of the screen!
  • Explain to your students that the “forever” loop is needed to ensure that the “if on edge, bounce” block will trigger every time the spaceship hits an edge.
  • Optional: Encourage students to experiment with different values for the “wait” block and “move pixels” block. How fast can they make the spaceship bounce around?
  • Bonus: Encourage students to experiment with the “pick random” code block to make the spaceship move randomly.
3. Crazy Ship Example (Example)
  • Students will view a project of a ship that moves randomly across the Stage and will point in a random direction between 1 and 360 degrees.
4. Crazy Ship (DIY)
  • In this DIY project, students will program a spaceship to move randomly and bounce when it hits an edge.
  • Notice that the “wait” block now says “0.2” seconds rather than “0.1” seconds. This is why the ship’s motion seems more choppy and sluggish than before!
  • Explain to your students that the “pick random” block is currently set to the widest possible set of angles--360 degrees. Have them try a smaller range of angles to see what happens.
  • Bonus: Encourage students to program the spaceship to move faster, farther, and more unpredictably.
5. Follow the Leader (Puzzle)
  • To solve this puzzle module, students will need to program the spaceship Actors to point towards the mouse pointer (web) or touch location (mobile), then move to the power cells.
  • Ask students, “How can we make the spaceships follow the mouse pointer (web) or touch location (mobile) to the power cell without crashing into an asteroid or each other?” (Use a “forever” loop and have the first spaceship continually point towards the mouse pointer or touch location. The second spaceship should point towards “Ship 1” and the third spaceship should point towards “Ship 2.”)
  • Give a hint: Ask students to practice changing the values of the move blocks to see if they can keep the spaceships from crashing into one another.
6. Car Chase Example (Example)
  • Students will view a project of three different cars following the mouse pointer (web) or touch location (mobile).
7. Car Chase (DIY)
  • In this DIY project, students will program three cars to move in a row as if they are in a car chase!
  • Did students finish early? Encourage them to program the cars to run smoother by adjusting the move distance or “wait” value of each car.
8. Obstacle Course Example (Example)
  • Students will view an obstacle course game where they will need to navigate a toy car across a floor of obstacles!
9. Obstacle Course (DIY)
  • In this DIY project, students will program an obstacle course game. The goal is to successfully navigate over, around, and through objects that block the path.
  • Encourage students to increase the size of the obstacles or reposition them to change the difficulty of the finished game.
  • Did students finish early? Direct their attention to the bonus section in “Step 7/7” of the tutorial, which encourages students to play each others’ obstacle games and brainstorm ways to improve them!

Extended Activities (20 minutes)

Reflection
Ask students to write down their answers to these short-response questions:
  • What do you enjoy most about coding using Tynker?
  • What do you feel you need to improve on as a coder?
  • What do you feel is your strongest programming skill?

U.S. Standards

  • CCSS-Math: 5.G.A.1, 5.G.A.2, 6.NS.C.6, MP.1
  • CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
  • CSTA: 1B-AP-11, 1B-AP-12, 1B-AP-15, 2-AP-13, 2-AP-16, 2-AP-17
  • CS CA: 3-5.AP.10, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17, 6-8.AP.13, 6-8.AP.16, 6-8.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b

U.K. Standards

National Curriculum of England (Computing)
Key Stage 2:
  • Design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
  • Use sequence, selection, and repetition in programs; work with variables and various forms of input and output
  • Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
Key Stage 3:
  • Design, use, and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems
  • Understand several key algorithms that reflect computational thinking (for example, ones for sorting and searching); use logical reasoning to compare the utility of alternative algorithms for the same problem
  • Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems; make appropriate use of data structures (for example, lists, tables, or arrays); design and develop modular programs that use procedures or functions
  • Understand simple Boolean logic (for example, AND, OR, and NOT) and some of its uses in circuits and programming; understand how numbers can be represented in binary, and be able to carry out simple operations on binary numbers (for example, binary addition, and conversion between binary and decimal)
  • Understand how instructions are stored and executed within a computer system; understand how data of various types (including text, sounds, and pictures) can be represented and manipulated digitally, in the form of binary digits
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
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
Storytelling
23 Slides
Lesson 6
User Interaction
19 Slides
Lesson 7
Guessing Game
22 Slides
Lesson 8
Rotation
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