Class Information
- Grades: 8–12 (students must be 13 or older to participate in this class)
- Lesson timeframe: One hour
- Featured tool: Fortnite Creative
- Class / learning environment: A Fortnite-capable device with a one-to-one device-to-student ratio, and with internet connectivity. A computer lab or mobile laptop cart should provide the ideal environment.
Author Contact
Authors: Steven Isaacs and Brian Dickman
Email: [email protected] | [email protected]
Twitter: @mr_isaacs | @cleverlike
LinkedIn: https://www.linkedin.com/in/steve-isaacs/ | https://www.linkedin.com/in/cleverlike
DESCRIPTION OF CLASS/LEARNING ENVIRONMENT
This lesson is designed for Hour of Code during Computer Science Education Week.
It is designed as a music lesson so it could also be used in a music course. Music composition is an important element in game design, and this lesson provides a great opportunity for students to experience music composition in the context of a game development course. This can serve as a stand-alone lesson, or be used in conjunction with the other activities to complete a larger project.
Author Steve Isaacs teaches Game Design and Development as a quest- or choice-based learning environment that provides students with opportunities to take different approaches to meeting the learning outcomes based on their own interests, in terms of content as well as project options.
Author Brian Dickman studied computer science and operates a full-time game development studio that produces entertaining and educational content inside popular video games.
Lesson Overview
Are you a fan of soundtracks in games? Do you have music sequences that play in your head for hours after playing your favorite game? Orchestras have dedicated entire concerts to musical scores from video games. Music is impactful and memorable. Using music in your digital projects can help elevate the audience experience and make your content more engaging.
In this project, you will create a machine in Fortnite Creative to play your own custom music loops!
Desired Results
What are the learning outcomes for students?
ESSENTIAL QUESTIONS/BIG IDEAS
Can students learn computer science concepts as part of a meaningful activity rather than simply learning syntax as an isolated skill?
Will learning computer science concepts like loops through an activity in Fortnite Creative generalize to understanding the concept in a coding environment?
Will students gain an appreciation for music composition in the context of game development?
Will students show more motivation to learn computer science when the concepts are introduced in a game environment?
LEARNING OUTCOMES/OBJECTIVES
The student will be able to:
- Demonstrate an understanding of loops as a computer science concept
- Apply an understanding of loops as a means of musical composition in the context of a game
- Create a looping musical score as background music in a game
Learning Activities
Introduction to Loops
In computer science, a loop is a programming structure that repeats a sequence of instructions until a specific condition is met. Programmers use loops to cycle through values, add sums of numbers, repeat functions, and many other things.
– from techterms.com
For example, if you are on a track that is a quarter mile in length, and want to run a mile, you would run around the track four times. This is an example of a loop. Once you have run around the track four times, you can stop.
Pseudocode is a way of writing coding concepts in a simple format that is easy for people to communicate and understand. The actual code in different programming languages will have different rules (or syntax), but pseudocode allows us to think about the code based on what we are trying to accomplish.
Here is an example of a loop written in pseudocode.
Repeat 4 Times { Run around the track }
Here are simple videos that explain how loops work in computer science.
Loops can be used in any coding language, and in environments like Fortnite Creative where you can set up a scenario that creates a loop to repeat a command either infinitely or for a specified number of times.
Activity
Students will create a looping musical score using the Sequencer and music blocks in Fortnite Creative.
The Sequencer in Fortnite Creative is a handy device that allows us to create a repeating sequence of events. In addition to running a sequence itself, the device has other attributes that give even more control of how it is used in the game.
The Sequencer can be set to have a three-dimensional volume (width x height x length). When the Sequencer is activated, it will send a pulse from the beginning of the volume to the end. This pulse will trigger any devices or objects in its path. We will use this to play music by placing music blocks inside the Sequencer volume.
The MusicBlock Gallery is a collection of building blocks that are labeled as music notes in a wide array of instruments. These blocks will play the notes when triggered. This gallery contains a plethora of colored-based tiles/blocks for each instrument type. Each block is labeled with the note that it will play. This makes it easier to construct a song just by knowing the notes.
Refer to the Student Guide and Teacher Notes for the step-by-step directions for the activity.
Students should access and work from the Student Guide.
Use the downloadable rubric to assess student work.
EXTERNAL RESOURCES
Mark Zuckerberg Explains Loops
Standards Mapping
1A-AP-10 Develop programs with sequences and simple loops, to express ideas or address a problem.
1B-AP-10 Create programs that include sequences, events, loops, and conditionals.
1B-AP-12 Modify, remix, or incorporate portions of an existing program into one’s own work, to develop something new or add more advanced features.
1A-AP-14 Debug (identify and fix) errors in an algorithm or program that includes sequences and simple loops.
2-AP-10 Use flowcharts and/or pseudocode to address complex problems as algorithms.
2-AP-13 Decompose problems and subproblems into parts to facilitate the design, implementation, and review of programs.
2-AP-17 Systematically test and refine programs using a range of test cases.
3A-AP-13 Create prototypes that use algorithms to solve computational problems by leveraging prior student knowledge and personal interests.
3A-AP-16 Design and iteratively develop computational artifacts for practical intent, personal expression, or to address a societal issue by using events to initiate instructions.
3A-AP-17 Decompose problems into smaller components through systematic analysis, using constructs such as procedures, modules, and/or objects.
3A-AP-22 Design and develop computational artifacts working in team roles using collaborative tools.
INTERDISCIPLINARY AND 21ST CENTURY CONNECTIONS
This lesson covers areas related to coding/Computer Science.
21st Century Connections:
- Critical thinking
- Creativity
- Collaboration
- Communication
- Technology literacy
- Flexibility
- Leadership
- Initiative
- Social skills
MODIFICATIONS AND ACCOMMODATIONS
Provide modifications and accommodations as appropriate based on student needs, IEP, 504, etc.
Students can work in teams to integrate a paired programming approach.
Sample map can be provided for students to deconstruct / modify.
Provide adaptive controller / game controller if necessary.