SHSubjectHub
Explore the Escape Room— See how state variables and branching paths work together
Step 1 of 8

Mobile App Studio

Build your app visually, test it live, then share a phone preview link.

✓ All changes saved

Build Your App

4 screens
Pages
App Map
Drag to reorder. Drop inside rows, columns, or page sections.
Layout sectionDrop items inside

🔐 The Mystery Study

🕵️
You're locked in! The door needs a code. Search the room carefully to find it...

What do you search first?

Screen
Rules
0 active rules for this component.

Try It Out

🔐 The Mystery Study

🕵️
You're locked in! The door needs a code. Search the room carefully to find it...

What do you search first?

{}
1 / 8

Welcome to the Escape Room!

The Escape Room is a 4-screen branching game where the user's choices determine the outcome.

The key technique is state — variables that are saved and read to determine what happens next. When the player searches the bookshelf, the app saves route = "Bookshelf 📚". When they escape, it saves score = 100. These values are then displayed on the final screen.

Screens:
- The Study — two choices: bookshelf or rug
- The Bookshelf — correct path → escape!
- Under the Rug — dead end → back to start
- Escaped! — victory screen with personalised route and score

This is selection (if/else branching) implemented through navigation rules!

💡State variables in apps work just like variables in programming: you store a value, then read it later. state.set stores the value; {{variableName}} reads it.