|
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
|
Lesson 15 Timers
In this lesson, students will learn how to use timer and operator code blocks to create fun cannonball launching games! Students will also customize a cannon firing game with exploding objects!
New Code Blocks
: Pauses the current script until the parameter condition is true.
Objectives
- Use timer and operator code blocks
- Create cannonball launching games that use a charging cannon
- Use code blocks to customize a cannon firing game
Think Abouts:
What does the
- static code block do?
- active code block do?
- start physics block do?
- stop physics block do?
- apply impulse block do?
- when actor collides block do?
- set gravity to block do?
- set shape to block do?
Lessons:
1. Introduction (Video)
- Students will watch an example of a cannon game.
2. Concepts (Video)
- A friendly alien introduces two coding concepts:
- Timer- Timers are used to keep track of time.
- Operators- Students will watch different examples of operators. The alien points out that operators can be used for arithmetic operations such as add, subtract, multiply, and divide. Operators such as "or" can be used in game loops when checking for two or more conditions.
3. Prime the Cannon Example (Example)
- Students will play a completed cannon game where they will need to hold the mouse down (web) or hold their finger down (mobile) to charge the cannon. The longer the cannon charges, the further the cannonball will travel. They’ll create their own version of this game in the next module!
4. Prime the Cannon (DIY)
- In this DIY (do-it-yourself) project, students will program a cannonball game that charges a cannon using a timer.
- Explain to students that the speed of the cannonball is set using the timer, so holding down the mouse (web) or the touch location (mobile) for a longer period of time will make the cannonball fly farther.
5. Precise Shots (Puzzle)
- To solve this puzzle module, students will need to add the code to set the impulse for the cannonball.
- Give a hint: Ask students, “Which three code blocks are needed to program the impulse with a timer?” (Answer: The “apply impulse,” “multiplication operator,” and “timer” code blocks are needed.)
6. Quiz (Multiple-choice)
- Students will answer 5 multiple-choice questions to review concepts from this lesson.
7. Cannon Crasher Example (Example)
- Students will play a completed Cannon Crasher game. They’ll create their own version of this project in the next module!
- Check that students are charging the cannon by holding down the mouse (web) or touch location (mobile).
8. Cannon Crasher Customizer (DIY)
- In this DIY project, students will customize a cannon firing game with exploding objects!
- The project is complete, so students will need to improve the game by modifying the code and adding customizations.
U.S. Standards
- K-12 CTSA Computer Science Standards (Revised 2017)
Computer Science Teachers Association:
- 1B-AP-10
- 1B-AP-11
- 1B-AP-15
- 2-AP-13
- 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
|