|
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
|
301 Shoot Projectiles (11) ***
Introduction
In this lesson, students will learn how to use repetition and screen edge detection to program projectiles while creating a project of a dragon shooting fireballs! Coding concepts from this lesson include: Repeat Until and Screen Edges.
New Code Blocks
- : Make the Actor repeat this loop until a true or false [boolean value] determines when the block should stop repeating the code inside it.
- : This is an addition operator that returns the sum of the two parameters.
- : This is a subtraction operator that returns the subtraction of the two parameters.
- : This is a comparison operator that returns true if the first value is less than the second value, and returns false otherwise.
- : This is a math operator that returns a random number between the two parameters.
Vocabulary
- Projectile: An object that is thrown, hurled, or tossed.
Objectives
Students will...
- Use code blocks to program Actors to detect screen boundaries and move to different screen locations
- Use code blocks to solve a puzzle module
- Create a game where a dragon shoots fireballs
Notes:
What is a Projectile?
- Today’s coding adventure involves a dragon shooting fireball projectiles!
- A projectile is an object that is thrown, hurled, or tossed.
- Can you give examples of projectiles. (Example: A cannonball launching out of a cannon)
1. Concepts (Video)
- Dan, the dragon rider, introduces two coding concepts:
- Repeat Until- Dan explains how the given script will keep repeating until a condition is met.
- Screen Edges- Students will interact with different scripts and observe how each script affects the Actor.
2. Add Projectiles (DIY)
- In this DIY (do-it-yourself) project, students will follow step-by-step directions to program a dragon to breathe fireballs that fly forward.
- Point out to students that if they put the operator values in the wrong order, then the program will not function as intended.
3. Program the Enemy (DIY)
- In this DIY project, students will add to their game by adding an enemy plane to shoot fireballs at.
- How to Play: Use arrow keys (web) or tilt the screen (mobile) to move the dragon. Use the spacebar (web) or tap the screen (mobile) to shoot fireballs.
- Remind students that they need to put the operator values in the correct order. Otherwise, their program will not function as intended.
4. Shoot the Planes (Puzzle)
- To solve this puzzle module, students will need to program a fireball to shoot from the dragon when the spacebar is pressed (web) or the screen is tapped (mobile). Students are provided a sample of what their end result should look like.
- Give a hint: Ask students…
- What should be the first code block in the sequence? (Answer: “when I receive game start”)
- What do we need the “repeat until” loop to do? (Answer: We need to program the “repeat until” loop to move the dragon 10 steps and pause until the dragon’s x-position is greater than the right edge of the screen.)
5. Make New Enemies (DIY)
- In this DIY project, students will add new enemies for their dragon to shoot fireballs at. Note: Students will need to draw their own enemy Actors or add enemy Actors from the Media Library.
- Check that students are customizing the movement pattern of each enemy.
6. Quiz (Multiple-choice)
Conclusion
In this lesson we learned how to set and change global variables to create powerups and invincibility powerups.
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
***All lesson information is from https://www.tynker.com/
|