Lesson 1: Programming for a Purpose
Lesson 1: Programming for a Purpose
Students will be able to:
Create a prototype of an animation or game design to meet the needs of a user using the problem-solving process
Identify features of an animation or game design that match the needs of users
Understand the steps of the problem-solving process
Question of the Day: How can we design animations and games based on the needs of a user?
To kick off a unit devoted to problem-solving and developing animations and games, students begin by investigating the design of different animations and games. Students look at a variety of animations and games and attempt to match each design with a potential user. Then students choose a user and attempt to prototype an animation or game design for them on paper or in a digital template. To conclude the activity, students consider what it means to be an animation and game designer and create resources for other users.
Slides: L01 Interactive Animations and Games - Lesson 01 - Programming for a Purpose - Google Slides
Worksheet: U3L01 - Activity Guide - Animation and Game Designs for Users - Google Docs
Lesson 2: Plotting Shapes
Students will be able to:
Communicate how to draw an image in Game Lab, accounting for shape position, color, and order
Reason about locations on the Game Lab coordinate grid
Slides: L02 Interactive Animations and Games - Lesson 02 - Plotting Shapes - Google Slides
Lesson 3: Drawing in Game Lab
Lesson 3: Drawing in Game Lab
Students will be able to:
Sequence code correctly to overlay shapes.
Use a coordinate system to place elements on the screen
Question of the Day: How can we communicate to a computer how to draw shapes on the screen? .
This lesson is designed to give students a chance to get used to the programming environment, as well as the basic sequencing and debugging that they will use throughout the unit. Students begin with an introduction to the GameLab interactive development environment (IDE), then learn the three commands (rect, ellipse, and fill) that they will need to code the same types of images that they created on paper in the previous lesson. Challenge levels provide a chance for students who have more programming experience to further explore Game Lab.
Slides: L03 Interactive Animations and Games - Lesson 03 - Drawing in Game Lab - Google Slides
Video: U3L03 Interactive animation and games
Work. Complete code.org numbers 1-9
Lesson 4: Shapes and Parameters
Students will be able to:
Use and reason about drawing commands with multiple parameters
Question of the Day: How can we use parameters to give the computer more specific instructions?
In this lesson, students continue to build skills and develop their familiarity with Game Lab by manipulating the width and height of the shapes they use to draw. The lesson kicks off with a discussion that connects expanded block functionality (e.g. different sized shapes) with the need for more block inputs, or "parameters". Students learn to draw with versions of ellipse() and rect() that include width and height parameters. They also learn to use the background() block. Throughout the lesson, students will need to reason about the x-y coordinate plane, consider the order of their code, and slightly increase their programs' complexity.
Slides: L04 Interactive Animations and Games - Lesson 04 - Shapes and Parameters - Google Slides
Video: U3L04
Work: code.org numbers 1-9
Lesson 5: Variables
Lesson 5: Variables
Students will be able to:
Identify a variable as a way to label and reference a value in a program
Use variables in a program to store a piece of information that is used multiple times
Question of the Day: How can we use variables to store information in our programs?
In this lesson, students learn how to use variables to label a value. Students begin the lesson with a very basic description of the purpose of a variable within the context of the storage component of the input-output-storage-processing model. Students then complete a level progression that reinforces the model of a variable as a way to label or name a number. Students should leave this lesson knowing that variables are a way to label a value in their programs so that they can be reused or referenced later. In the following lesson, students will be introduced to random numbers, in which they will see a more powerful use for variables, and in later lessons, students will continue to expand their understanding of variables and experience more advanced ways they can be used.
Slides: L05 Interactive Animations and Games - Lesson 05 - Variables - Google Slides
Video: U3L05 code.org Unit 3 lesson 5
Work: code.org numbers 1-8
Lesson 6: Random Numbers
Lesson 6: Random Numbers
Students will be able to:
Generate and use random numbers in a program
Update a value stored in a variable
Question of the Day: How can we make our programs behave differently each time they are run?
This lesson introduces randomness, which is important both as a way to make programs more interesting and also to motivate the use of variables. Students are introduced to the randomNumber() block and how it can be used to create new behaviors in their programs. They then learn how to update variables during a program. Combining all of these skills, students draw randomized images.
Slides: L06 Interactive Animations and Games - Lesson 06 - Random Numbers - Google Slides
Video: Code.org Unit 3 Lesson 6
Work code.org numbers 1-8
Lesson 7: Mini-Project - Robot Faces
Lesson 7: Mini-Project - Robot Faces
Students will be able to:
Apply variables, shapes, and randomNumber concepts to create a program.
Use a structured process to plan and develop a program.
Question of the Day: How can we use shapes, variables, and randomness to express our creativity?
After a quick review of the code they have learned so far, students are introduced to their first creative project of the unit. Using the problem-solving process as a model, students define the robot face that they want to create, prepare by thinking of the different code they will need, try their plan in Game Lab, then reflect on what they have created. They also have a chance to share their creations with their peers.
Slides: L07 Interactive Animations and Games - Lesson 07 - Mini-Project Robot Race - Google Slides
Work: U3L07 - Activity Guide - Robot Face Planning - Google Docs *This is an overal work sheet however this lesson will be modified in class with aditional requirments.
Lesson 8: Sprites
Lesson 8: Sprites
Students will be able to:
Create and use a sprite
Question of the Day: How can we use sprites to help us keep track of lots of information in our programs?
In order to create more interesting and detailed images, students are introduced to the sprite object which allows for one variable name to control both the shape and all its aspects. The lesson starts with a discussion of the various information that programs must keep track of, then presents sprites as a way to keep track of that information. Students then learn how to assign each sprite an image, which will greatly increase the complexity of what they can draw on the screen.
Slides: L08 Interactive Animations and Games - Lesson 08 - Sprites - Google Slides
Video: code.org Unit 3 Lesson 8 Sprites
Work: code.org numbers 1-11
Lesson 9: Sprite Properties
Lesson 9: Sprite Properties
Students will be able to:
Use dot notation to update a sprite's properties
Question of the Day: How can we use sprite properties to change their appearance on the screen?
In the last lesson, when students were introduced to sprites, they focused mainly on creating a sprite and assigning it an animation. This lesson starts to dig into what makes sprites such a powerful programming construct - that they have properties that can be modified as a program is running. This lays the foundation for much of what students will be doing in the rest of the unit in terms of accessing and manipulating sprite properties to create interesting behaviors in their programs.
Slides: L09 Interactive Animations and Games - Lesson 09 - Sprite Properties - Google Slides
Video: code.org Unit 3 Lesson 9 Numbers 1-3
Work: code.org numbers 1-6
Lesson 10: Text
Lesson 10: Text
Students will be able to:
Place text on the screen using a coordinate plane.
Use arguments to control how text is displayed on a screen.
Question of the Day: How can we use text to improve our scenes and animations?
This lesson introduces Game Lab's text commands, giving students more practice using the coordinate plane and parameters. This is the last type of element that students will be placing on the screen - after this, students will focus on how they can control the movement and interactions of these elements. The lesson begins with asking students to caption a cartoon created in Game Lab. They then move on to Code Studio where they practice placing text on the screen and controlling other text properties, such as size. Students who complete the assessment early can go on to learn more challenging blocks related to text properties.
Slides: L10 Interactive Animations and Games - Lesson 10 - Text - Google Slides
Video: code.org unit 3 Lesson 10 1-3
Work: code.org numbers 1-6
Lesson 11: Mini-Project - Captioned Scenes
Lesson 11: Mini-Project - Captioned Scenes
Students will be able to:
Use a structured process to plan and develop a program.
Question of the Day: How can we use Game Lab to express our creativity?
Slides: L11 Interactive Animations and Games - Lesson 11 - Mini-Project Captioned Scenes - Google Slides
Work: U3L11 - Activity Guide - Sprite Scene Planning - Google Docs *This is an overal work sheet however this lesson will be modified in class with aditional requirments.
Lesson 12: The Draw Loop
Lesson 12: The Draw Loop
Students will be able to:
Explain how the draw loop allows for the creation of animations in Game Lab
Use the draw loop in combination with the randomNumber() command, shapes, and sprites to make simple animations
Question of the Day: How can we animate our images in Game Lab?
In this lesson, students are introduced to the draw loop, one of the core programming paradigms in Game Lab. To begin the lesson students look at some physical flipbooks to see that having many frames with different images creates the impression of motion. Students then watch a video explaining how the draw loop in Game Lab helps to create this same impression in their programs. Students combine the draw loop with random numbers to manipulate some simple animations with dots and then with sprites. Students should leave the lesson understanding that the commands in the draw loop are called after all other code but are then called repeatedly to create animation. Students will have a chance to continue to develop an understanding of this behavior in the next two lessons, but laying a strong conceptual foundation in this lesson will serve them well for the rest of the unit.
Slides: L12 Interactive Animations and Games - Lesson 12 - The Draw Loop - Google Slides
Video: Unit 3 Lesson 12 code.org
Work code.org lesson 12 numbers 1-8
Lesson 13: Sprite Movement
Lesson 13: Sprite Movement
Students will be able to:
Identify which sprite properties need to be changed, and in what way, to achieve a specific movement
Use the counter pattern to increment or decrement sprite properties
Question of the Day: How can we control sprite movement in Game Lab?
This lesson builds on the draw loop that students learned previously to create programs with purposeful motion. Students learn how to control sprite movement using a construct called the counter pattern, which incrementally changes a sprite's properties. Students first brainstorm different ways that they could animate sprites by controlling their properties, then explore the counter pattern in Code Studio. After examining working code, students try using the counter pattern to create various types of sprite movements. The skills that students build in this lesson lay the foundation for all of the animations and games that they will make throughout the rest of the unit.
Slides: L13 Interactive Animations and Games - Lesson 13 - Sprite Movement - Google Slides
Video: code.org Unit 3 Lesson 13 numbers 1-4
Work: code.org Lesson 13 numbers 1-8
Lesson 14: Mini-Project - Animation
Lesson 14: Mini-Project - Animation
Question of the Day: How can we combine different programming patterns to make a complete animation?
This lesson is a chance for students to get more creative with what they have learned as students are asked to combine different methods that they have learned to create an animated scene. Students first review the types of movement and animation that they have learned and brainstorm what types of scenes might need that movement. They then begin to plan out their own animated scenes, which they create in Game Lab.
Slides: L14 Interactive Animations and Games - Lesson 14 - Mini-Project Animation - Google Slides
Work: U3L14 - Activity Guide - Animated Scene Planning - Google Docs *This is an overal work sheet however this lesson will be modified in class with aditional requirments.
Lesson 15: Conditionals
Lesson 15: Conditionals
Students will be able to:
Use conditionals to react to changes in variables and sprite properties
Students will be able to:
Move sprites in response to keyboard input
Use conditionals to react to keyboard input
Question of the Day: How can programs react to changes as they are running?
This lesson introduces booleans and conditionals, which allow a program to run differently depending on whether a condition is true. Students start by playing a short game in which they respond according to whether particular conditions are met. They then move to Code Studio, where they learn how the computer evaluates Boolean expressions, and how they can be used to structure a program.
Slides:L15 Interactive Animations and Games - Lesson 15 - Conditionals - Google Slides
Video: code.org unit 3 Lesson 15
Work: code.org lesson 15 numbers 1-8
Lesson 16: Keyboard Input
Lesson 16: Keyboard Input
Students will be able to:
Move sprites in response to keyboard input
Use conditionals to react to keyboard input
Question of the Day: How can our programs react to user input?
One common way conditionals are used is to check for different types of user input, especially key presses. Following the introduction to booleans and if statements in the previous lesson, students are introduced to a new block called keyDown() which returns a boolean and can be used in conditionals statements to move sprites around the screen. By the end of this lesson, students will have written programs that take keyboard input from the user to control sprites on the screen.
Slides:L16 Interactive Animations and Games - Lesson 16 - Keyboard Input - Google Slides
Video: CS Discoveries Unit 3: Lesson 16 - Keyboard Input (25 - 26)
Work
Lesson 17: Mouse Input
Students will be able to:
Respond to a variety of types of user input.
Use an if-else statement to control the flow of a program.
Question of the Day: What are more ways that the computer can react to user input?
In this lesson, students continue to explore ways to use conditional statements to take user input - this time with the mouse. They will also expand their understanding of conditionals to include else, which allows for the computer to run a certain section of code when a condition is true, and a different section of code when it is not. This concept is introduced alongside several new mouse input commands, allowing students to gradually build up programs that use input in different ways.
Slides: L17 Interactive Animations and Games - Lesson 17 - Mouse Input - Google Slides
Video: U3L17
Work: code.org Lesson 17 numbers 1-8
Lesson 18: Project - Interactive Card
Students will be able to:
Apply an iterator pattern to variables or properties in a loop
Sequence commands to draw in the proper order
Use conditionals to react to keyboard input or changes in variables / properties
Question of the Day: What skills and practices are important when creating an interactive program?
This is a good place for students to bring together all the pieces they have learned (drawing, variables, sprites, images, conditionals, user input) in one place. In this project, students plan for and develop an interactive greeting card using all of the programming techniques they've learned to this point. Giving students the opportunity to really be creative after learning all these new concepts.
Slides: L18 Interactive Animations and Games - Lesson 18 - Project Interactive Card - Google Slides
Work: U3L18 - Project Guide - Interactive Card - Google Docs *This is an overal work sheet however this lesson will be modified in class with aditional requirments.
U3L18 - Peer Review - Interactive Card - Google Docs
Lesson 19: Velocity
Students will be able to:
Describe the advantages of simplifying code by using higher level blocks
Use the velocity and rotationSpeed blocks to create and change sprite movements
Question of the Day: How can programming languages hide complicated patterns so that it is easier to program?
This lesson launches a major theme of the chapter: that complex behavior can be represented in simpler ways to make it easier to write and reason about code. After a brief review of how they used the counter pattern to move sprites in previous lessons, students are introduced to the idea of hiding those patterns in a single velocity block. Students then head to Code Studio to try out new blocks that set a sprite's velocity directly, and look at various ways that they are able to code more complex behaviors in their sprites. Over the next several lessons, students will see how this method of managing complexity allows them to produce more interesting sprite behaviors.
Slides:
Video:CS Discoveries Unit 3: Lesson 19 - Velocity (25 - 26)
Work
Lesson 20: Collision Detection
Students will be able to:
Describe how abstractions help to manage the complexity of code
Detect when sprites are touching or overlapping, and change the program in response.
Question of the Day: How can programming help make complicated problems more simple?
This lesson formally introduces the use of abstractions, simple ways of representing underlying complexity. In the last lesson, students were exposed to the idea of using one block to represent complex code. Working in pairs, students further explore this idea in the context of the intentionally complex mathematical challenge of determining whether two sprites are touching. Students then use a single block, the isTouching() block, to represent this complexity and to create different effects when sprites collide. By the end of the lesson, students should understand that by using a single block to represent this complexity, it becomes much easier to write and reason about code and appreciate the value of using abstractions.
Slides:
Video:CS Discoveries Unit 3: Lesson 20 - Collision Detection (25 - 26)
Work:
Lesson 21: Mini-Project - Side Scroller
Question of the Day: How can the new types of sprite movement and collision detection be used to create a game?
This lesson is another chance for students to get more creative with what they have learned. Students use what they have learned about collision detection and setting velocity to create a simple side-scroller game. After looking at a sample side-scroller game, students brainstorm what sort of side-scroller they would like to make, then use a structured process to program the game in Code Studio.
*This is an overal work sheet however this lesson will be modified in class with aditional requirments.
Lesson 22: Complex Sprite Movement
Students will be able to:
Explain how individual programming constructs can be combined to create more complex behavior
Use sprite velocity with the counter pattern to create different types of sprite movement
Question of the Day: How can previous blocks be combined in new patterns to make interesting movements?
This lesson does not introduce any new blocks and in fact, only uses patterns students have seen in Chapter 1 and demonstrates how combining these patterns, in particular the abstractions students learned in the previous two lessons, allows them to build new behaviors for their sprites. Specifically, this lesson has students learn how to combine the velocity properties of sprites with the counter pattern to create more complex sprite movement. After reviewing the two concepts, they explore various scenarios in which velocity is used in the counter pattern and observe the different types of movement that result, such as simulating gravity. They then reflect on how they were able to get new behaviors by combining blocks and patterns that they already knew.
Slides:
Video:CS Discoveries Unit 3: Lesson 22 - Complex Sprite Movement
Work:
Lesson 23: Collisions
Students will be able to:
Describe how abstractions can be built upon to develop even further abstractions
Model different types of interactions between sprites.
Question of the Day: How can programmers build on abstractions to create further abstractions?
This lesson introduces collisions, another useful abstraction that will allow students to manipulate their sprites in entirely new ways. After a brief review of how they used the isTouching block, students brainstorm other ways that two sprites could interact. They then use isTouching to make one sprite push another across the screen before practicing with the four collision blocks (collide, displace, bounce, and bounceOff). This is the last time they will learn a new sprite behavior, and following this lesson students will transition to focusing on how they organize their increasingly complex code.
Slides: U3L23 CSD Interactive Animations and Games - Lesson 23 - Collisions - Google Slides
Video: CS Discoveries Unit 3: Lesson 23 - Collisions (25 - 26)
Work:
Lesson 24: Mini-Project - Flyer Game
This lesson is another chance for students to get more creative with what they have learned. Students use what they have learned about simulating gravity and the different types of collisions to create simple flyer games. After looking at a sample flyer game, students brainstorm what sort of flyer games they would like, then use a structured process to program the game in Code Studio.
Question of the Day: How can the new types of collisions and modeling movement be used to create a game?
Slides: U3L24 CSD Interactive Animations and Games - Lesson 24 - Mini-Project Flyer Game - Google Slides
*This is an overal work sheet however this lesson will be modified in class with aditional requirments.
Lesson 25: Functions
In previous lessons, students have learned to use a number of abstractions in their programs which have allowed them to build much more complex programs while ignoring the details of how that behavior is created. In this lesson, students learn to build abstractions of their own by creating functions that will serve to organize their code, make it more readable, and remove repeated blocks of code. Students first think about what sorts of new blocks they would like in Game Lab, and what code those blocks would contain inside. Afterward, students learn to create functions in Game Lab. They will use functions to remove long blocks of code from their draw loop and to replace repeated pieces of code with a single function.
Question of the Day: How can programmers use functions to create their own abstractions?
Slides: U2L25 CSD Interactive Animations and Games - Lesson 25 - Functions - Google Slides
Lesson 26: The Game Design Process
This lesson introduces students to the process they will use to design games for the remainder of the unit which is centered around a project guide that asks students to define their sprites, variables, and functions before they begin programming their game. Students begin by playing a game on Game Lab where the code is hidden, discussing what they think the sprites, variables, and functions would need to be to make the game. For the purposes of heavily scaffolding the software development process, students are then given a completed project guide that provides starter code and shows one way to implement the game. Students are then walked through this implementation process through a series of levels and have an opportunity to make improvements to the game to make it their own in the final level. In the subsequent lessons, students will need to complete a greater portion of the guide independently, and for the final project, they will follow this process largely independently.
Question of the Day: How does having a plan help to make a large project easier?
Slides: U3L26 CSD Interactive Animations and Games - Lesson 26 - The Game Design Process - Google Slides
Video: CS Discoveries Unit 3: Lesson 26 - The Game Design Process
Lesson 27: Using the Game Design Process
In this multi-day lesson, students use the problem-solving process from Unit 1 to create a platform jumper game. This lesson also builds on the use of the Project Guide in the previous lesson by having students complete more of this project guide independently before using it to build a game. Students begin the lesson by looking at an example of a platform jumper, then define what their games will look like. Next, they use a structured process to plan the backgrounds, variables, sprites, and functions they will need to implement their game. After writing the code for the game, students will reflect on how the game could be improved, and implement those changes.
Question of the Day: How can the problem-solving process help programmers to manage large projects?
Video: CS Discoveries Unit 3: Lesson 27 - Using The Game Design Process
Lesson 28: Project - Design a Game
Students will plan and build their own game using the project guide from the previous two lessons. Working individually, students will first decide on the type of game they'd like to build, taking as inspiration a set of sample games. They will then complete a blank project guide where they will describe the game's behavior and scope out the variables, sprites, and functions they'll need to build. In Code Studio, a series of levels prompts them on a general sequence they can use to implement this plan. Partway through the process, students will share their projects for peer review and will incorporate feedback as they finish their game. At the end of the lesson, students will share their completed games with their classmates.
Question of the Day: How can the five CS practices (problem-solving, persistence, communication, collaboration, and creativity) help programmers to complete large projects?
*This is an overal work sheet however this lesson will be modified in class with aditional requirments.
Code.org. (2024). Computer Science Discoveries ('24-'25) (Grade 6-8) Computer science. https://studio.code.org/courses/csd-2024