|
Computer Science Home
6th Grade Tech Ed
7th Grade Computer Science
8th Grade Computer Science A
Gmail
Google Drive
Google Classroom
Infinite Campus
Typing.com
(Join Class through Google Classroom)
Schoology
Code.org
Tynker Coding Website
Tynker Resource Page
Tynker Online Support Video Help
Quizlet | Quizlet LIVE
Everfi
Khan Academy
Social Media Tips
Netsmartz
Code HS
Karel the Dog class code: 1251
CSTA Standards
ISTE Standards
|
Introduction
In this lesson, students will create their very own 2-player game using the Tynker physics engine, which simulates gravity so that a projectile will move in an arc--just like it would in real life! The goal of the game is to use the cannon Actors to launch projectiles at given objects and knock them off the platform. Customize your game (specified in Step 8/8 of the tutorial) by adding sound effects, changing the Actor’s costumes, or creating more platforms.
New Code Blocks
- : Start program when the play button is clicked.
- : Set whether the Actor is affected by gravity and other Actors.
- : Start program when the Actor is clicked.
- : Make the Actor repeat this loop while the condition is true.
- : Point an Actor towards the mouse-pointer.
- : Send a message to the Actor that handles special effects, with the specified parameter.
- : Set the position of an Actor to the position of the parameter (e.g., right cannon).
- : Set the linear velocity to the specified value, which affects the Actor’s speed.
- : Set whether the Actor will be rectangular or circular when colliding with other Actors.
Vocabulary
Objectives
Students will...
- Use new code blocks to create a 2-player game
- Use physics blocks to program Actors to move and bounce around the Stage
Materials
Getting Started (5 minutes)
1. Explain to your students that there is only one module in this lesson.
2. Get students excited for the lesson by playing the sample project: Go to the “Answer Key” section of this lesson plan, click the “Open Sample Project” link, then click the green “Play” button below the Stage. How to use the cannon: Left-click on the cannon (igloo) to activate it and drag the mouse around to aim, then release the mouse button to launch a projectile.
Activities (20 minutes)
Facilitate as students complete the Introduction to Game Design module on their own:
1. Physics Cannon 2-Player (DIY)
- Students will follow a step-by-step tutorial to create their very own 2-player game where two players take turns launching projectiles by clicking on and aiming each cannon.
- This module introduces the Tynker Physics engine which simulates concepts like gravity, linear velocity, and density.
- The code for the right cannon has already been completed for your students. To use the cannon, they need to left-click on the cannon and drag the mouse around to aim, then release the mouse button to launch a projectile. Students will finish the game so that the left and right cannons can be used to launch a watermelon.
- If students finish early, encourage them to experiment with their code and customize their game. Step 8/8 of the tutorial provides suggestions such as:
- Creating more platforms and Actors to knock over
- Playing sound effects when Actors collide
- Changing the monkey Actor’s costume
Optional Activities (20 minutes)
Theme It!
- Are students more into the creative side of game design? Tell students to keep their code, but change the theme. For example, here is a picture of a kitchen-themed launching game that uses kettle Actors as cannons:
U.S. Standards
- K-12 CTSA Computer Science Standards (Revised 2017)
Computer Science Teachers Association:
- 1B-AP-10
- 1B-AP-11
- 1B-AP-12
- 1B-AP-15
- 2-AP-12
- 2-AP-13
- 2-AP-15
- 2-AP-16
- 2-AP-17
CCSS-Math: MP.1
- CCSS-ELA: RF.5.4.A, 6-8.RST.3, 6-8.RST.4, 6-8.RST.7
- 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.12, 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
|