Help your students advance their skills as they build Paint Racer, a pen-drawing game, and Cannon Crasher, a physics game. Harness the power of the physics engine to easily program realistic jumps and bouncing balls. Upon completing this lesson plan, students will be able to use model physics properties and generate math art.
- Geometric patterns
- Projectile physics
- Physics engine
- Hit boxes
- Static platforms
- Velocity and force
- Interactions between objects
- Special effects
* Online courses require a modern desktop computer, laptop computer, Chromebook, or Netbook with Internet access and a Chrome (29+), Firefox (30+), Safari (7+), or Edge (20+) browser. No downloads required.
* Tablet courses require an iPad (iOS 10+) with Tynker or Tynker Junior app installed and Internet access
Programming 202 Lesson Plan
Lesson: Pen Drawing
Time: 60+ mins
IntroductionWelcome to the first lesson in the Programming 202 course! In this lesson, students will learn how to point an Actor, draw with a pen, and change the pen settings. Additionally, students will create their own interactive drawing project!
New Code Blocks
: Start the program when the play button is selected. : Point the Actor towards the parameter (e.g., mouse-pointer, touch location). : Pick up the pen to stop drawing on the Stage. : Put the pen down to draw on the Stage. : Set the pen’s color to the specified color. : React when the specified parameter is detected. : Make the Actor repeat this loop while the condition is true. : Move the Actor a specified number of units. : Pause the program for a specific number of seconds.
- 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
- 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
- Use Pen commands and the “point towards” code block
- Use code blocks to create an interactive drawing project
- Computers, laptops, or mobile devices (1 per student) with student account access to Tynker.com
Warm-Up (15 minutes)Ask students...
- What would you like to learn in the Programming 202 course?
- What is something you struggled with in previous Tynker courses?
- What is something you excelled at in previous Tynker courses?
- What do you enjoy most about programming?
Activities (45 minutes)Facilitate as students complete all Pen Drawing modules on their own:
1. Pen Drawing (Video)
- Students will watch a short video that introduces cool projects they can create using Tynker!
- Students will watch a sample of a race car drawing a line and collecting orbs.
- A space alien reviews three coding concepts:
- Point Towards Block - Students will review the “point towards” block, which tells an Actor to face towards something.
- Pen Down - Students will watch Codey demonstrate the “pen down” and “pen up” code blocks.
- Change Pen Settings - Students get to interact and review different pen drawing code blocks.
- In this module, students will play a completed Follow the Leader project. They’ll create their own version of this project in the next module!
- How to move the racer: Tell students to drag their mouse pointer (web) or drag their finger (mobile) across the Stage.
- Tell students to click the red stop button to move on to the next module.
- In this DIY (do-it-yourself) module, students will follow step-by-step directions to program a green racer to chase the mouse pointer (web) or chase their touch location (mobile).
- Did students finish early? Direct their attention to the bonus section (“Step 4” of the tutorial), which encourages students to change the speed of the green racer and change the value of their “move pixels” code block.
- In this DIY project, students will practice sending and receiving messages as they use more pen tools to create trails for the starships.
- The alien broadcasts four messages to all Actors when clicked (web) or tapped (mobile), and each message tells the spaceships to complete one side of a square by moving forward and turning 90 degrees.
- Did students finish early? Encourage them to experiment with their code and make the ships draw different shapes!
- To solve this puzzle module, students will need to program the racer to paint a green line as it follows the mouse pointer (web) or touch location (mobile).
- Give a hint: Tell students to place the “mouse down?” (web) / “touch location?” (mobile) block in the “repeat while” code block.
- In this module, students will play a completed Draw on Your Own project. They’ll create their own version of this project in the next module!
- Optional: Ask students, “Which code block makes the car draw a line? ‘Pen up’ or ‘pen down?’” (Answer: “pen down”)
- In this DIY project, students will program an Actor to draw a continuous colored line on the Stage.
- After students finish coding their project, encourage them to have fun drawing!
- Do students need ideas on what to draw? Here are some things they could draw: Their favorite animal, a house, the mountains, or their favorite food!
- Students will answer 5 multiple-choice questions to review concepts from this lesson.
Extended Activities (10 minutes)More Practice
- Challenge students to apply concepts from this lesson to create a project where a spider Actor spins a web as it follows the direction of the mouse (web) or touch location (mobile). Ask students to think about what kind of background and other elements they would like to include.
- CCSS-Math: MP.1
- CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- CSTA: 1B-AP-10, 1B-AP-11, 1B-AP-15, 2-AP-13, 2-AP-16, 2-AP-17
- CS CA: 3-5.AP.10, 3-5.AP.12, 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