Shadow Ridge Middle School Computer Science

Tynker 202

Mrs. Hulstrom

 

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 9 - The Physics Engine

In this lesson, we’re going to learn how to activate the physics engine in our projects and how to apply gravity to actors.

Lesson Objective

At the end of this lesson students will be able to:

  • Activate the physics engine.
  • Set up and apply gravity to multiple actors.

Introduction

What physics?

Physics is the study of forces and their impacts on the environment

  • Many of the most popular video games wouldn’t exist without physics, would they? Any time one object or character collides with another one what you see if physics in action. Does anyone have any examples of physics?

Vocabulary

  • Physics - physics is the study of forces and their impacts on the environment.
  • Gravity - the force that causes objects to fall to the ground.

New Blocks

The blocks we will be learning about in this lesson are ‘on start’, ‘start physics’, ‘set gravity to’, ‘set shape to’, ‘point in direction’, and ‘go to x y’.














Lessons

1. Introduction


2. Play the Game Cannon Crasher Game

Read the instructions on the screen so you understand the rules of the game.

  • Move the mouse to aim
  • hold the mouse down to add impulse
  • Release the mouse button to shoot


3. Concepts

Let’s find out more about the physics engine.


5. Stack the Blocks

In this tutorial we’re going to learn how to use the physics engine to make two rectangular blocks stand up on their sides. Follow along with me as we work through some practice examples. Click on the ‘Stack the Blocks’ icon.

Read the text and click the Play button and watch as the blocks appear to bounce up and then land again on their edges

Step 1 - Start Physics

Now we’re going to add the background, actors and the code to start the physics engine. I’m going to demonstrate and I want you to follow along.

  • Follow the prompts and demonstrate as students follow along.
  • Encourage students to ask questions and help one another.
  • Here is the completed code

Step 2 - Code for the Left Wall

Now we’re going to add the background, actors and the code to start the physics engine.

Step 3 - Code the Right Wall

6. Stack 'em Up

In this puzzle we need to code the top block so it is stacked properly on top of the other two blocks.

Step 1: What should the Set Shape block be assigned (rectangular or round)?

Step 2: What direction should the ‘point in direction’ block be set to?


7 & 8 - Example and Make Your Own Structure

Use what you have learned to complete your own game structure!

9. Quiz

When you have successfully made your own structure, save your project and take the quiz. If you had any problems with the quiz go back and review the module you had difficulty with.

Conclusion

In this lesson we learned how to add physics to a project. We also learned how to add gravity to actors and how to set the shape of actors so they move realistically when set into motion.

Transfer Learning 

Now that you know how to add physics to your projects the possibilities of what you will be able to create are endless! Practice adding physics to many different actors of varying shapes and sizes. Also try experimenting with the ‘set shape’ block to observe how this setting affects the motion of the objects. You should also try adjusting the ‘point in direction’ values and observe the affect this has on your objects. The more you practice the better you will understand the physics engine and how to use it in your projects.

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
     
 
Shadow Ridge Middle School
12551 Holly Street
Thornton, Colorado 80241
720-972-5040