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: www.linkedin.com/in/steve-isaacs | www.linkedin.com/in/cleverlike
DESCRIPTION OF CLASS/LEARNING ENVIRONMENT
This lesson is designed for Hour of Code during Computer Science Education Week.
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 is the Education Program Manager at Epic Games. In his role, he supports secondary educators and students in bringing tools, including Unreal Engine, Fortnite Creative, and Twinmotion, into the classroom. Prior to his role at Epic, Steve taught Game Design and Development in a choice-based learning environment that provided students with opportunities to take different approaches to meeting the learning outcomes based on their 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
Did you realize that you could learn computer programming concepts in Fortnite Creative? Well, you can!
“IF you finish your vegetables, THEN you can have ice cream.” Have your parents ever uttered a statement like this? In coding, we call that a conditional statement. If the condition is met, then the result is activated.
In this activity, you will create a lock-and-key game mechanic where the player has to find a key to unlock a door that allows the player to advance in the game.
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 functions through an activity in Fortnite Creative generalize to understanding the concept in a coding environment?
Can students learn computer science concepts through game mechanics?
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 conditional statements as a concept.
- Apply the understanding of conditional statements in the context of a game.
- Create a puzzle in a game environment that incorporates the use of conditional statements.
Learning Activities
Introduction to Conditional Statements
A conditional statement is a set of rules performed if a certain condition is met. It is generally referred to as an If-Then statement, because IF a condition is met, THEN an action is performed.
– from Computer Hope: Conditional Statement
For example, IF you finish your vegetables THEN you can have ice cream. This example is pretty clear. In order to have ice cream you would have to finish your vegetables.
Here’s a simple video that explains If-Then-Else statements:
Conditional statements can be used in any coding language, and also environments like Fortnite Creative where you can set up a scenario that tests a condition and something is activated only if that condition is met.
Activities
Students will create a puzzle in Fortnite Creative utilizing the item spawner and conditional button to demonstrate conditional statements.
In Fortnite, the conditional button provides a great example of conditional statements. Conditional buttons can be set up so that a certain item is required to activate the button and in turn, initiate an action.
The item spawner can automatically spawn certain item items. The game designer can indicate which item is required, and how many of that item are needed to activate the button.
For example, the item spawner can be set to automatically spawn a slurp fish, and the conditional button can require the player to have a slurp fish in their inventory in order to activate. In turn, the conditional button can send a signal to another device to complete the conditional statement. The signal can be received by a lock attached to a door that will unlock when the signal is received. Essentially, any device that receives a signal from a radio channel can be activated with a conditional button.
Refer to the Teacher Guide for the step by step directions for the activity.
Students should access and work from the Student Guide to create their own lock and key system.
Upon completion of the guide, students should challenge themselves to incorporate the concept into a puzzle to challenge their peers.
Refer to the Teacher Guide for the step-by-step directions for the activity.
Students should access and work from the Student Guide.
Extension Activities
- Hide the item spawner so that the player has to first find the key before unlocking the door.
- Set it up so the player needs to find a number of items hidden in the world to unlock the door.
- Create a puzzle that requires different keys to open different doors to make it through a short maze.
Refer to the Teacher Guide for the step-by-step directions for the activity.
EXTERNAL RESOURCES
Conditional Statement Video Conditional Statement Definition
Standards Mapping
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.
1B-AP-15 Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended.
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.