UevKF8zjRV_WEtpJsXhr
We use cookies on this site to enhance your user experience

Story Game Creator Challenge

Code Your Own Story Game

Developed by Roblox
Start your coding journey with Roblox while joining millions participating in the world-wide Hour of Code™ initiative.
10 and up Computer Science
English 1 hour
ISTE Standards: Innovative Designer 4a, 4c, 4d, Creative Communicator 6b, 6d

Learning Objectives:

  • Create variables for storing player input using Lua code in Roblox Studio
  • Combine player input with a pre-written story
  • Test and troubleshoot the resulting code

Skills and Concepts:

  • Variable - A placeholder for information in code.
  • String - A variable that can store whole sentences, written in quotations.
  • Concatenation - Combining two strings into one using ..

Getting Ready

Preparation:

Materials:

Lesson Overview

10 min

Introduction

Introduce the project and Hour of Code™ initiative.

5 min

Guided Work
Create Stories

Have students write their stories and create placeholders.

25 min

Guided Tutorial
Story Games

Lead students through a tutorial to build a story game

15 min

Independent Work
Finish Student Projects

Let students catch up or continue building stories.

5 min

Wrap Up

Recap the lesson and have student shares stories


Lesson Plan

Introduction
10 min
  1. Play this video about Hour of Code™, a nationwide initiative that introduces millions of students to one hour of computer programming.
  2. Tell students they will be building a game using Roblox Studio, the tool used to create all Roblox games. Students will write a story and then use player answers to replace words and names. For example: One day [name] woke up and ate a giant [player's favorite food].
  3. Play the project overview video to show students the game they will create and build excitement.
Guided Work - Create Stories
5 min
  1. [Optional] Provide students paper and pencil to write their stories.
  2. Lead students through the lessons Writing the Story and Creating Placeholders.
    • Have students do this activity away from computers to reduce distractions.
    • Brainstorming Tip: Have students generate ideas by having one suggest a character (wizard, chef, etc), and another suggesting what that character does.
Guided Tutorial - Story Games
25 min
  1. Continue by leading students through Lesson 1 - Opening the Template.
  2. Lead students through Lesson 2 - Asking Questions.
  3. Lead students through Lesson 3 - Write the Story.
    • In "Adding to the Story", some students may have a variable in the middle of a sentence. Show both how to concatenate a variable at the end and one in the middle of a sentence, such as "In a " .. place1 .. " lives the wizard."
    • Encourage students to check that each concatenation has two dots (..)and that their capitalization matches the example script, especially for words like storyMaker.
Independent Work - Finish Student Projects
15 min
  1. Show students Lesson 3 - Finishing the Story - Tips and Tricks.
  2. Have students catch up on their projects. If finished, add the following challenges, have them add two or more characters (each using a different variable: name2, name3).
Wrap Up
5 min
  1. Recap what students have created and vocabulary: variable, string, concatenation.
  2. Encourage 2 or 3 students to verbally share the story they wrote as a class.
    • For example, one student reads out the story and then calls on another student to provide an answer.

Appendix

Troubleshooting Tips

General Troubleshooting Tips

  • Introduce students to “Ask 3 Before Me”: a student needs to ask three peers before asking the instructor for help.
  • Have neighbors test each others work. As they test, encourage students to look out for common errors like missing spaces in concatenation.

Lesson 1: Creating Variables

  • To help students better find the Story Manger script, draw the order on a display board: StarterGUI > GameGUI > StoryManager.
  • As students type in their first variable, make sure it’s between the two dashed green lines. This will help avoid future errors.

Lesson 2: Getting Player Answers

  • Stress strict capitalization and spelling as students type words like storyMaker and GetInput. Having one letter misspelled or incorrectly capitalized will cause an error.
  • Remind students to press the Stop button whenever they’re done playtesting.

Lesson 3: Telling the Story

  • As students type out sentences, they may notice extra spaces or some words combined together. String variables show literally everything between quotations.
  • If the story writes words that are combined like, “wizardNia”, add an extra space before that variable.
Customizing the Lesson

Simplify the Lesson

  • Have students focus on just writing one question, one sentence, and one variable.

Expand the Lesson

  • Have students include at least one technique from Tips and Tricks.
  • Allow students to trade places to play each other games when finished.
Misc. Resource

Check for Understanding Questions

Lesson 1 Questions Answer
A variable is ... A placeholder for information
What does scripts hold? Code to run programs
Name an example of a good variable name: adjective03, name3, myVerb1
Where in the script does the code need to be typed? Between the two green dashed lines
Lesson 2 Questions Answer
Variables can hold more than one type of information. True or false? True
String type variables are sandwiched between what? Quotation marks
What can and cannot have spaces between them in your code? String contents can have spaces (like "My name"), variables cannot (like name1)
Lesson 3 Questions Answer
What does concatenation do and how? Combines two or more strings/variables together using ..

Course Description

Discover how to build the ultimate interactive word game using Roblox’s free coding and design tools. In this unique one-hour course, students will be able to explore the basics of computer programming and game design, then share their completed game online with friends to craft their own fun stories! Created specifically for students new to programming, this curriculum was developed in partnership between Roblox, the largest entertainment platform for user-generated 3D experiences, and Hour of Code™, a global movement that aims to broaden participation in computer science.

In this course, your student will:

  • Learn and develop programming fundamentals with Lua.
  • Use programming to create a story game in a 3D world.
  • Take home a complete game that can be played and shared online.

Promotional Poster (Download)

Feel free to use this 8.5x11 print out to advertise your event.


The Hour of Code™ is a nationwide initiative by Computer Science Education Week and Code.org to introduce millions of students to one hour of computer science and computer programming. These documents are licensed by Roblox Corporation under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Roblox, Powering Imagination, and Robux are trademarks of Roblox Corporation, registered in the United States and other countries.