Lesson 16: Chase Game with Events

Overview

In this online activity, students will have the opportunity to learn how to use events in Play Lab and to apply all the coding skills they've learned to create an animated game. It's time to get creative and make a game in Play Lab!

Purpose

Here, students will further develop their understanding of events using Play Lab. Students will use events to make characters move around the screen, make noises, and change backgrounds based on user input. At the end of the puzzle sequence, students will be presented with the opportunity to share their projects.

Agenda

Warm Up (10 min)

Main Activity (30 min)

Wrap Up (15 min)

Extended Learning

View on Code Studio

Objectives

Students will be able to:

  • Create an animated, interactive game using sequence and event-handlers.
  • Identify actions that correlate to input events.

Preparation

  • Play through the puzzles to find any potential problem areas for your class.
  • Make sure every student has a journal.

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the Students

Vocabulary

  • Event - An action that causes something to happen.

Support

Report a Bug

Teaching Guide

Warm Up (10 min)

Introduction

Briefly discuss the Flappy Bird game from the last lesson. Ask students to come up with the various events in the game. Events include:

  • Flappy hitting the ground
  • Flappy hitting an obstacle
  • A player clicking the screen
  • Flappy passing an obstacle

Now discuss the actions that correspond to these events. Flappy running into something ends the game, but Flappy passing an obstacle wins a point. A player clicking makes Flappy flap his wings.

Ask the students what other events and actions they'd like to see. What other kinds of games could be built around those events and actions?

Main Activity (30 min)

Lesson Tip

Students will have the opportunity to share their final product with a link. This is a great opportunity to show your school community the great things your students are doing. Collect all of the links and keep them on your class website for all to see!

Remind the students to only share their work with their close friends or family. For more information watch or show the class Pause and Think Online - Video.

Online Puzzles and Free Play

This is the most free-form online activity of the course. At the final stage students have the freedom to create a game of their own. You may want to provide structured guidelines around what kind of game to make, particularly for students who are overwhelmed by too many options.

Wrap Up (15 min)

Journaling

Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.

Journal Prompts:

  • What was today's lesson about?
  • How did you feel about today's lesson?
  • What is an event your program used today?
  • Is there an event that would you like to have used in your game that you did not get to use in Play Lab?

Extended Learning

Use these activities to enhance student learning. They can be used as outside of class activities or other enrichment.

Look Under the Hood

When you share a link to your story, you also share all of the code that goes behind it. This is a great way for students to learn from each other.

  • Post links to completed stories online.
    • Make a story of your own to share as well!
  • When students load up a link, have them click the "How it Works" button to see the code behind the story.
  • Discuss as a group the different ways your classmates coded their stories.
    • What surprised you?
    • What would you like to try?
  • Choose someone else's story and click Remix to build on it. (Don't worry, the original story will be safe.)
View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

Let's play a game. Score 5 points by moving the Penguin to the Octopus!

View on Code Studio

Student Instructions

Now, write a program to make Waddles the Penguin move around using the up / down / left / right keys to hit all of the targets!

View on Code Studio

Student Instructions

The repeat forever block allows you to run code over and over forever. Use this block to move Chomp the Dino (actor 2) up and down by 400 pixels forever.

View on Code Studio

Student Instructions

Can you have Waddles (actor 1) say "Ouch!" and play a "hit" sound if he runs into Chomp?

When you're done, play the game to make that happen.

View on Code Studio

Student Instructions

View on Code Studio

Student Instructions

  • Free Play
  • 12
  • (click tabs to see student view)
View on Code Studio

Student Instructions

  • Levels
  • Extra
  • (click tabs to see student view)
View on Code Studio

Student Instructions

Use a new block to make Waddles automatically move back to the start when he runs into the Dinosaur and when he scores a point. This will make your game more challenging and fun!

Play the game and move Waddles with the arrows until you score 5 or more points. Waddles must be moved to the middle left position of the screen to complete this challenge.

Standards Alignment

View full course alignment

CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
  • 1A-AP-09 - Model the way programs store and manipulate data by using numbers or other symbols to represent information.
  • 1A-AP-11 - Decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.

Cross-curricular Opportunities

This list represents opportunities in this lesson to support standards in other content areas.

Common Core English Language Arts Standards

L - Language
  • 2.L.6 - Use words and phrases acquired through conversations, reading and being read to, and responding to texts, including using adjectives and adverbs to describe (e.g., When other kids are happy that makes me happy).
SL - Speaking & Listening
  • 2.SL.1 - Participate in collaborative conversations with diverse partners about grade 2 topics and texts with peers and adults in small and larger groups.
  • 2.SL.1.a - Follow agreed-upon rules for discussions (e.g., gaining the floor in respectful ways, listening to others with care, speaking one at a time about the topics and texts under discussion).
  • 2.SL.1.b - Build on others’ talk in conversations by linking their comments to the remarks of others.
  • 2.SL.6 - Produce complete sentences when appropriate to task and situation in order to provide requested detail or clarification.

Common Core Math Standards

MP - Math Practices
  • MP.1 - Make sense of problems and persevere in solving them
  • MP.2 - Reason abstractly and quantitatively
  • MP.5 - Use appropriate tools strategically
  • MP.6 - Attend to precision
  • MP.7 - Look for and make use of structure
  • MP.8 - Look for and express regularity in repeated reasoning