Elementari

Open The Treasure Chest

Designed by:

Introduction

Design an interactive treasure-hunting story where the player must find a hidden item before opening a locked chest. Students write scenes, build suspense, and guide their reader through a mysterious setting using narration, visuals, and interactive buttons. Using simple logic blocks and a Boolean variable, they "lock" the chest until the correct key is found. This creative project blends cause-and-effect reasoning with storytelling — perfect for ELA, game-based learning, or cross-curricular coding.

Subjects:
Grades: 6-8
Estimated Time For Completion: 3 classes (each 45 minutes)

Objectives

Students will:

  • Plan and write an interactive story with clear setting, character, and problem
  • Use Boolean variables and if/else logic to control page navigation
  • Apply descriptive language and tone to enhance narration
  • Build interactive scenes using backgrounds, characters, and buttons
  • Debug and revise based on feedback and testing


Code Stories and Games with Elementari

Elementari helps students personalize stories and games with simple coding. In this project, students use Boolean logic to build a branching story where the player’s choices control what happens next. They combine scene design, narration, and clickable objects to create an interactive adventure that only unlocks when conditions are met. By programming behavior into their story world, students gain a deeper understanding of logic, conditionals, and narrative flow — all while writing with purpose.

New to Elementari? Click on the orange Start button to jump right into the lesson for free. Check out our Getting Started Guide for an overview of how Elementari works with your class. Get started for free for up to 35 student accounts.

Teacher Notes

Prep Resources:

Use the Treasure Chest Writing Organizer to help students plan their characters, setting, key item, and locked object. This organizer includes sentence starters, examples, and visual planning prompts.

Support Tools:

Facilitation Tips:

  • Begin with a full-class story brainstorm — have students pitch “what’s locked and what’s the key”
  • Model writing and coding one page at a time before students try it independently
  • Encourage playtesting early: have students click through to test whether their logic works
  • Stretch students by adding extra clues, decoy objects, or red herrings on new pages
  • Wrap up with a showcase session or digital gallery walk

Lesson Resources

Coding Concepts Covered

Functions in Sequence Function in Parallel User Navigation

Student Instructions

1. Plan Your Scene 🧠 (30 mins)

Use your Writing Organizer to plan your game (make a copy).

  • What is the setting?
  • Who is the main character?
  • What is locked? What is needed to open it?
  • What kind of mood or tone will your narration use?

🎮 View the Example Project!

2. Title Page 🎬 (10 mins)

Create a bold and creative title for your story.

3. Game Start + Player Instructions 📜 (10 mins)

Use narration to describe the setting, introduce the locked chest (or object), and explain what the player needs to find. Add your main character.

4. Add Your Key Item 🔑 (10 mins)

Place your key item (e.g., glowing key, scroll, gem).

Use the Create Boolean Variables block to create a variable (has_key). When you click on the key, set has_key to true with the Variable = Value block.

You can make this page pretty later!

5. Success Page 🎉 (10 mins)

Reveal the reward!

Add narration that describes what happens next.

Write a short message or theme, like a moral or discovery.

6. Locked Chest Logic 🔒 (15 mins)

Code the locked item (treasure chest or door).

If the player has the key, go to the success page.

7. Code Navigation Buttons 🧭 (15 mins)

Make sure you can only go to the ending after the player finds the key.

Add Next and Back buttons so the player can move through the story.

🎮 Use Go To Page and Lock Navigation Next Page blocks

8. Make it Look Awesome 🎨 (30 mins)

Some ideas:

🎨 Add your characters, backgrounds, and props (like objects or decorations).

🎵 Code some music or a voiceover to play!

Interactive Project Example for Students

Play through this lesson's example project created on Elementari. Use this example to guide and motivate your students.

Select Lessons or Create Your Own Lesson!