Lesson 1: Game Design
45 minutes
Overview Objectives
This lesson is intended to prepare students to create simple Students will be able to:
game projects in Sprite Lab, a block-based programming
environment where you can make simple animations and games Create groups of sprites, and control
with objects and characters that interact with each other. a single sprite from the group using
Students will begin to form an understanding of the events.
programming model of this tool, and explore ways they can use Create new sprites.
it to express themselves.
In this skill-building lesson, students will work through a series
of programming levels on the computer, finishing with an open-
Links
ended “free play” task where they can build whatever they like.
Students will write programs and learn about the two concepts Heads Up! Please make a copy of any
at the heart of Sprite Lab: sprites and behaviors. Students will documents you plan to share with
learn to create and animate sprites and make them interactive students.
using events.
For the teachers
CSF - Course E - Slides - Slides
Standards Full Course Alignment
(Download) Make a Copy
CSTA K-12 Computer Science Standards (2017) Helpful Hints - Resource (Download)
AP - Algorithms & Programming Make a Copy
Intro to Sprite Lab - Video
Agenda Vocabulary
Warm Up (5 minutes) Behavior - An action a sprite performs
Lesson Introduction continuously until it’s told to stop.
Sprite Review Event - An action, like a key press,
Code Review that causes something in your
program to happen.
Main Activity (35 minutes)
Sprite - An object on the screen with
Game Design Setup
a location, size, and appearance.
Sprite Behaviors
Events
Practice
Wrap Up (5 minutes)
Teaching Guide
Warm Up (5 minutes)
Lesson Introduction
Display: Key Vocabulary slide
Vocabulary: Read aloud the vocabulary words written in the slide.
Display:Lesson Objectives slide
Do This: Read aloud the objectives written on the slide
Display: Key Vocabulary slide
Sprite Review
Remarks
Sprites are objects that have different attributes or properties. The object is like a car that has different
properties like size, color, make, model, and year. Or it’s like a dog that has a size, breed, age, color. Each sprite can
be a little different and you can set the properties with code.
Display: Key Vocabulary slide
Vocabulary: You will choose the costume the sprite starts with and you can code the costume to change whenever
you want in the program or game.
Display: Discuss slide
Discuss: How would you describe this sprite scene? If you wanted someone to create this scene for you on a
computer what instructions would they need?
Discussion Goal: Students should identify both sprites in this project, describe their behaviors (movements), and
also notice there is a background. Give students time to brainstorm ideas. If they aren’t sure what to say, clarify that
you are just asking them to state observations about what they see.
Display: Reflect slide
Remarks
Let’s look at these instructions line by line.
This is the code that was used to make this scene. Let’s read through it together. The computer always reads code
in the sequence (order) it is written from top to bottom.
Code Review
Do This: Read the code one block at a time starting at the top. Point to each block and each image as you go. Make
a note about sequence and how we couldn't put the behavior block before the make sprite block because the
computer reads code form top to bottom accentuating the remark above.
Discuss: What is the same or different about our instructions and this code?
Discussion Goal: Students will notice the code sequence was similar to the instructions. They will see each part was
specifically mentioned (background, penguin, fire box, and the penguin’s movement). They will also see how the
coding blocks describe what the code will do, for example “sprite begins patrolling” makes it clear that this sprite
will start a “patrolling” behavior.
Main Activity (35 minutes)
Game Design Setup
1-4 Game Design Setup
1 2 3 4
Display: Level 1 Video slide
Do This: Play the video for students full group.
Teaching Tip
In Levels 2-16, students will be following instructions and working at their own pace. Here are a few tips that
should help students while they're working through the levels.
Display: Levels 2-7 Skill Building slide
Do This: Transition students to their devices. Have them go to Level 2. Remind them to follow the instructions on
each level, click on the light bulb for hints and read the feedback in the yellow box under the instructions if
something is not quite right in their code.
Sprite Behaviors
5-7 Sprite Behaviors
5 6 7
Events
8-14 Events
8 9 10 11 12 13 14
Teaching Tip
Events can be a very tricky concept for students to grasp. It may be very helpful to pull the class together at
this point in the lesson to preview and discuss how events work before they continue independently.
Display: Level 8 Video slide
Do This: Pause students’ independent work when several students have finished level 7 in order to give an overview
of using groups of sprites. It’s okay if the whole class is not yet finished with level 7 to preview the Lots of Sprites
video.
Display: Events slide
Explain how events work with the four part diagram on this slide. 1. The user presses a key on the keyboard. 2. The
keyboard sends a signal to the computer. 3. The computer makes a decision based on the code. 4. The computer
updates the display.
Display: (next) Events slide
Do This: Explain that arrow keys are one type of event that can make a program interactive.
Discuss: What other ways could we give a user control over what happens in an app or game?
Discussion Goal: Students will start to recognize that events trigger actions to happen on the computer. Some
other examples might include: pushing the power button, moving the mouse, clicking on an button on the screen,
pressing buttons on the keyboard
Display: (next) Events slide
Remarks
When you’re working with groups of sprites, sometimes you will only want to give instructions to one sprite at a
time. To help achieve this, events have a mini-toolbox that opens when you click the +. Inside the toolbox are
subject and object sprites that you can drag into other coding blocks for more precise control.
Practice
15 Practice Choices
Choice levels offer students the chance to pick what is most interesting to them. All of the choices here practice
the same skills with different themes.
Wrap Up (5 minutes)
Display: Today you learned... slide
Do This: Review the day’s learning objectives and have students reflect on how they accomplished each of these
during the activity.
Display: Review slide (Click on the slide to reveal the first scenario)
Do This: Look over and read aloud the 3 code snippets together as a class.
Have students write down which code they think would be best. After everyone has an answer, discuss as a class.
Repeat for all three scenarios.
…to arrange 8 enemies in a perfect line? [Answer: Code C because with the grid block you can easily place multiple
sprites exactly where you want them to go]
… to make a game with 100 randomly placed gems to collect? [Answer: Code B because with this block you can
choose the number of sprites and they will be randomly placed on screen]
…to set the location of one player at the beginning of the game? [Answer: Code A because with this block you are
placing just one sprite at a time and setting the location with x,y coordinates]
Remarks
When we are coding there are often many different ways to program the same thing. The best solution is the one
that creates the shortest, most efficient program.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing [Link] materials for commercial purposes contact us.