15-Day Challenge: Programming For Entertainment
15-Day Challenge: Programming For Entertainment
Page 1 of 7
15-Day Challenge
draw something on a screen? Debugging - Finding and fixing problems in an algorithm or
Practice/Application: The primary purpose of this lesson is to program.
introduce students to the coordinate system they will use in Game Program - An algorithm that has been coded into something that
Lab. Students may have limited experience with using a coordinate can be run by a machine.
grid or may struggle with the "flipped" y-axis in Game Lab. The Introduced Code: rect(x, y, w, h), ellipse(x, y, w, h), fill(color)
drawing tool also forces students to think about other features of Supplementary Materials:
Game Lab students will see when they begin programming in the Question of the Day: How can we communicate to a computer
next lesson. These include the need to consider order while how to draw shapes on the screen?
drawing, the need to specify color, and the fact that circles are Practice/Application: The main purpose of this lesson is to give
positioned by their center and squares by their top-left corner. By students a chance to get used to the programming environment, as
the end of this activity, students should be ready to transfer what well as the basic sequencing and debugging that they will use
they have learned about communicating position to the throughout the unit. Students begin with an introduction to the
programming they will do in the next lesson. GameLab interactive development environment (IDE), then learn
Review and Assessment: See the final reflection questions. This the three commands (rect, ellipse, and fill) that they will need to
objective will also be assessed in the next lesson, within the context code the same types of images that they created on paper in the
of programming in Game Lab. previous lesson. Challenge levels provide a chance for students who
Wrap Up: Students share responses to the following questions: have more programming experience to further explore Game Lab.
What things were important in communicating about position, Review and Assessment: See level 9 in Code Studio, in particular
color, and order of the shapes in this activity? What's a way you the placement of the square in the picture. See level 9 in Code
have seen similar problems solved in the past? Studio, in particular that the square is displayed in front of the
circles.
Wrap Up: Students share their responses with the class: Today you
learned how to draw in Game Lab for the first time. What type of
advice would you share with a friend who was going to learn about
drawing in Game Lab to make it easier for them?
Page 2 of 7
15-Day Challenge
Supplementary Materials: Shapes and Parameters program.
Question of the Day: How can we use parameters to give the Introduced Code: var x;, var x = __;
computer more specific instructions? Supplementary Materials: Naming Variables, Variables,
Practice/Application: This lesson gives students a chance to Introduction to Variables (video)
slightly expand their drawing skills while continuing to develop Question of the Day: How can we use variables to store
general purpose programming skills. They will need to reason about information in our programs?
the x-y coordinate plane, consider the order of their code, and Practice/Application: This lesson is the first time students will see
slightly increase their programs' complexity. This lesson should be variables in the course, and they are not expected to fully
focused primarily on skill-building. understand how variables work by its conclusion. Students should
Review and Assessment: See level 7 in Code Studio. leave this lesson knowing that variables are a way to label a value in
Wrap Up: You use parameters to control your shape's location and their programs so that they can be reused or referenced later. In
size. Students share other situations in which parameters might be the following lesson students will be introduced to random
useful. numbers, in which they will see a more powerful use for variables.
Using variables to manipulate drawings is a surprisingly challenging
skill that requires a great deal of forethought and planning. While
students will use or modify many programs in this lesson, they are
not expected to compose programs that use variables to modify the
features of a drawing. In later lessons, students will expand their
understanding of variables and more advanced ways they can be
used.
Review and Assessment: See the reflection prompt in the Wrap
Up. See Level 7 in Code Studio.
Wrap Up: Students consider the following prompts: What is your
own definition of a variable? Why are variables useful in programs?
Have students silently write their ideas before sharing in pairs and
then as a whole group.
Page 3 of 7
15-Day Challenge
Supplementary Materials: Random Numbers location, movement, and look.
Question of the Day: How can we make our programs behave Dot notation - the way that sprites' properties are used in Game
differently each time they are run? Lab, by connecting the sprite and property with a dot.
Practice/Application: This lesson introduces randomness, which is Introduced Code: drawSprites, var sprite = createSprite(x, y)
important both as a way to make programs more interesting, but Supplementary Materials: Animation Tab, Sprites, Introduction to
also to motivate the use of variables. In the middle of the activity, Sprites (video), The Animation Tab (video)
students are exposed to a variable that is updated multiple times in Question of the Day: How can we use sprites to help us keep track
the program, expanding their understanding of how variables can of lots of information in our programs?
be used. Practice/Application: Keeping track of many shapes and the
Review and Assessment: See level 6 in Code Studio. See level 4 in different variables that control aspects of those shapes can get very
Code Studio. Check that students have updated the value of complex. There will be lots of variables with different variable
"petalSize" between drawing the two flowers. names. Instead, computer scientists created something called an
Wrap Up: Allow students to share what sorts of random things they object which allows for one variable name to control both the shape
might like in their programs. and all its aspects. In Game Lab we use a certain type of object
called a sprite. A sprite is just a rectangle with properties for
controlling its look. Properties are the variables that are attached to
a sprite. You can access them through dot notation.
Using the Animation Tab, students can create or import images to
be used with their sprites. Later on, these sprites will become a
useful tool for creating animations, as their properties can be
changed and updated throughout the course of a program.
Review and Assessment: See levels 10 and 11 on Code Studio.
Wrap Up: So far we've been able to change a sprite's location and
image. What else might you want to change about your sprites?
Allow students to share their ideas.
Page 4 of 7
15-Day Challenge
Supplementary Materials: Sprite Properties Practice/Application: This lesson introduces text, which students
Question of the Day: How can we use sprite properties to change will need as they begin to build more complex programs (e.g. games
their appearance on the screen? with scoreboards). This is the last type of element that students will
Practice/Application: In the last lesson, when students were be placing on the screen. After this, students will focus on how they
introduced to sprites, they focused mainly on creating a sprite and can control the movement and interactions of these elements.
assigning it an animation. This lesson starts to dig into what makes Review and Assessment: Use Level 5 as an assessment for
sprites such a powerful programming construct--that they have students. Click inside the level to view a rubric.
properties that can be modified as a program is running. This lays Wrap Up: You've drawn with both text and shapes on the screen.
the foundation for much of what students will be doing in the rest What are two ways drawing with text is similar to drawing shapes?
of the unit in terms of accessing and manipulating sprite properties What is one way that drawing with text is different from drawing
to create interesting behaviors in their programs. with shapes? Allow students to share their answers.
Review and Assessment: See Code Studio level 5.
Wrap Up: What is one way sprite properties are the same as
variables? What's one way that sprite properties are different from
variables? Allow students to discuss in pairs or small groups before
sharing out to the entire group.
Day 10 Mini-Project: Captioned Scenes (Day 1 of 2) Day 11 Mini-Project: Captioned Scenes (Day 2 of 2)
Content Objective: Students will be able to use a structured Content Objective: Students will be able to use a structured
process to plan and develop a program. process to plan and develop a program.
Supplementary Materials: Planning Guide, Rubric, Exemplar Question of the Day: How can we use Game Lab to express our
Question of the Day: How can we use Game Lab to express our creativity?
creativity? Practice/Application: When the work is complete, hold a “Gallery
Practice/Application: This lesson is a chance for students to get Walk”. Allow students to walk around the room and see the pictures
more creative with what they have learned. Some students may that each of their classmates has coded. Celebrate all of the
spend more time in the animation tab drawing than programming. different ideas that students were able to implement with the same
Encourage students to spend time on parts of the activity that basic code.
interest them, as long as they meet the requirements of the Review and Assessment: Use the project rubric attached to this
assignment. lesson to assess student mastery of learning goals.
The open-ended nature of this lesson also provides flexibility for the Wrap Up: What was one especially creative way you saw someone
teacher to decide how long students should spend on their work, else use the blocks today? Have students share what they
depending on the scheduling demands of the particular course appreciated about their classmates' projects. Do this "popcorn"
Page 5 of 7
15-Day Challenge
implementation. style, with each student who responds choosing the next person.
Page 6 of 7
15-Day Challenge
● The draw loop is run by Game Lab at a constant frame rate
of 30 frames per second. You do not actually need to call the
function yourself.
● The "frames" in Game Lab can be thought of as transparency
sheets. Unless you draw a background, then all your new
shapes or sprites will simply appear on top of your old ones.
● You should only have one draw loop in your program.
Wrap Up: How does the draw loop help us make animations?
Page 7 of 7