Shadow Ridge Middle School Computer Science

Tynker 101

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

Programming 101 Keeping Score!

Game on! In this lesson, students will create a simple game and learn how to keep score using a pre-programmed Actor called “Score.”

New Code Blocks

  •  : Listen for a message or broadcast from other scripts before activating.
  •  : Return a random number between two parameters.

Vocabulary

  • Random Number: A number that is selected without purpose and has no specific pattern.

Objectives Students will...

  • Use code blocks to keep track of score in games
  • Apply coding concepts to generate a random number from a given range of numbers
  • Apply coding concepts to make characters respond to messages they receive
  • Create a game where characters appear and disappear in random places

List at least three different games that keep track of score. (Sport games, arcade-style games, Stickman Soccer, Flappy Bird, Tetris)

  • What is the purpose of keeping track of score in a game? Do you think the game would be more exciting or less fun if it didn’t track score? Why?
  • Explain to your students that they will be creating a game where characters appear and disappear in random places, and score is kept.

Activities (45 minutes)

1. Introducing Random Numbers (Video)
  • Students will watch a short video where Professor Ada uses dice to introduce the concept of random numbers.
2. Concepts (Video)
  • This module introduces three coding concepts:
    • “When I receive” block- This block is necessary for an Actor to do something with a message it gets from a “broadcast” or “message” block.
    • "Pick a random number" block- Ada illustrates a variety of ways that the block can be used to generate a random number.
    • "Score"- This is a special Tynker Actor that is pre-programmed to keep track of and display the score during a game. You send the Actor messages telling it what to do with the score.
3. Balloon Game Example (Example)
  • Students will view a balloon game project, then create their own version in the next module!
  • Tell students to pop the balloon by tapping (for mobile) or clicking (for web) on it.
4. Balloon Game (DIY)
  • In this DIY project, students will program a balloon to fly up in the sky when they press the “Start” button, and pop when they tap or click it!
  • Students will program two Actors: a balloon and “Start” button. Students will add code to the “Start” Actor to broadcast a start message to all Actors when clicked or tapped.
  • Emphasize to students that the “when I receive” code block listens for a message or broadcast from other scripts before activating. In this example, the balloon Actor uses a “when I receive” code block so that when it receives the start message, it begins to rise up slowly.
5. Balloon Game II Example (Example)
  • Students will view an example of a project that expands on their balloon game by repositioning the balloon and moving the ballon when it’s popped.
  • Tell students to click the “Start” button to start the game.
6. Balloon Game II (DIY)
  • In this DIY project, students will enhance their balloon game by randomizing the balloon placement, allowing the balloon to reappear after it is popped.
  • This version of the game uses new random number concepts, as well as concepts learned in previous lessons (e.g., “hiding” and “showing”)
  • Students are introduced to the “pick random” code block, which chooses the x-value for where the balloon will appear on the Stage. Note: The y-value will always be -200, so it can always start at the bottom of the Stage.
  • The “pick random” block always needs to be given a lowest number and highest number to pick from.
  • Emphasize to students that the “pick random” block is always dragged inside another code block.
  • Encourage students to repeatedly push the “Start” button so they have a visual representation of the “pick random” block being applied to the balloon Actor--which causes the balloon to appear randomly across the screen!
7. Adding Score Example (Example)
  • In this module, students will view a balloon game that uses a Score counter!
  • Ask students, “What did the Score Actor do?” (Keep track of how many balloons were popped)
8. Adding Score (DIY)
  • In this DIY project, students will add on to their balloon game by including a Score Actor, which keeps track of how many balloons are popped!
  • Students are introduced to a pre-programmed Actor called “Score,” that sends a message every time a balloon is popped, tracking the number of pops.
  • When students play the game, they can now see their score on the Stage.
9. Pop the Candy (Puzzle)
  • To solve this puzzle module, students will need to add a popping animation and score to the jelly bean popping game.
  • Give a hint: Tell students that they need to program Codey to move by following the mouse pointer or touch location.
  • Are students struggling? Tell them that their code blocks need to: Add 1 to the score; move through 8 costumes that each jelly bean uses when it pops; and make the jelly bean disappear. Also tell students that their “send message” block should add score to “Score.”
10. Ghost Game Example (Example)
  • In this module, students will view an example of a ghost hunting game!
  • Students can earn points by clicking or tapping on the ghosts.
11. Ghost Game (DIY)
  • In this DIY project, students will create a fun ghost hunting game!
  • Activities include programming a ghost to appear and disappear in random locations, and increasing the score whenever a ghost is clicked or tapped on.
  • Students will need to use two “pick random” blocks inside the “go to” block, one for the x-value and one for the y-value. Remind students of the screen bounds in both the x- and y-directions.
  • Emphasize to students that this game is different from the balloon-popping game--when you click or tap on the ghost Actor, it doesn’t pop.
  • Did students finish early? Encourage them to enhance their game by adding a ghostly sound to the background and adding a sound when a ghost Actor is clicked or tapped on.
12. Quiz (Multiple-Choice)

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: 2.OA.B.2, 3.NBT.A.2, 4.NBT.A.2, MP.1, MP.2, MP.4
  • CCSS-ELA: RF.1.1, RF.2.4, RF.2.4.A, RF.3.4.A, RF.4.4.A, RI.2.6
  • CS CA:K-2.AP.12, K-2.AP.13, K-2.AP.16, 3-5.AP.13, 3-5.AP.14, 3-5.AP.17
  • ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 7.c
     
 
Shadow Ridge Middle School
12551 Holly Street
Thornton, Colorado 80241
720-972-5040