Home
// Digital Technology - Year 9 & 10 //

ESCAPE ROOM ARCHITECT

Over the next 10 phases you will design and code your own escape room in HTML, CSS and JavaScript: scenes to explore, hidden clues, locks, an inventory and a ticking clock. On Escape Night the class tries to break out of every room. You are the architect. You are the puzzle maker. You are the coder.

🔐 3+ Locks
⏱️ Live Timer
💻 HTML CSS JS
🏁 Escape Night
Your Toolkit
🛠️
Room Studio
Built into this page, below the rubric: HTML, CSS and JS tabs, a Run button and a live preview of your room. Nothing to install and no account needed.
🧱
Three Languages
HTML is what is in the room: scenes, text, buttons. CSS is how it looks. JS is how it works: locks, items and the clock.
💾
Save Routine
End of every phase: Save downloads your room as one .html file to Downloads. Start of every phase: Open and choose that file. The Studio also keeps a draft in this browser, but your Downloads file is the safe copy.
📋
Copy Boxes
Each code box says which tab it goes in. Click Copy, click that tab, click where the code goes, press Ctrl+V, then Run. Then change it to fit your room.
🏁
Escape Night
Your finished room is a single .html file that plays in any browser. On Escape Night it runs on your laptop as a station and the class tries to break out.
⚠ For teacher: answers sit in each room's code, so the night's rule is no View Source, no DevTools and no Room Studio for players. Veyon makes it easy to check.
🧠
AI Co-Pilot
copilot.microsoft.com - ask it to explain an error, an idea like setInterval, or to brainstorm a riddle.
⚠ AI code often uses different names from your room. Only paste code you can explain, line by line.
// Primary Objective

Design and code a playable escape room with at least three locks, hidden clues, an inventory and a countdown - fair enough to solve, hard enough to brag about - then watch the class try to escape it on Escape Night.

Design a setting, a story and a chain of puzzles where every lock leads to the next
Build scenes in HTML and give your room its own look with CSS
Code locks, clues, items and a clock in JavaScript with functions, if/else, arrays and timers
Test with silent playtesters, fix what they find, then open your room on Escape Night
// Marking Key & Rubric
Criteria Trapped
(0-1)
Searching
(2-3)
Unlocked
(4)
Escaped
(5)
Score
Room Design No clear story or way out A setting, scenes to explore and at least one lock Three or more locks chained in a clear order, with a story that ties them together A room people talk about: atmosphere, a twist and puzzles that fit the setting / 5
Code Room only works with heavy teacher help Scenes and one lock work using the Studio code Locks, clues, inventory and clock all work, adapted to your room Your own changes or new mechanics, and you can explain every function you use / 5
Puzzle Fairness Answers can't be worked out from the room Every answer is somewhere in the room Clues lead logically to answers, and hints help without giving it away Satisfying "aha" moments, tested and tuned with real players / 5
Test & Showcase No playtest, room not ready One playtest done, some bugs fixed Bug log with fixes backed by playtests, room ready on the night Polished room, a great silent host, fair to every player / 5
Total / 20
Scroll sideways to see every column
Room Studio
// Build here, then press Run to play your room

Save downloads one .html file (your whole room). Open loads it back. Play opens your room full screen in a new tab. Reset brings back the demo room - press it twice to confirm.

Build Phases
Week 1
01
🗝️ Room Brief
▾
// PHASE OBJECTIVEDemo room escaped and taken apart. Your setting, story and three-lock chain planned on paper. First save in Downloads.
  • Scroll up to the Room Studio. The demo room, The Locked Lab, is already loaded. Play it in the preview and escape
  • Now open each tab and find the code behind what you just did: the scenes in HTML, the colours in CSS, and in JS the two functions that make it work: go() shows one scene and hides the rest, tryLock() checks an answer
  • Change one word of the story in the HTML tab and press Run. That's the whole workflow: edit, Run, play
  • Pick your setting: a haunted manor, a submarine, a heist vault, an abandoned space station, a pharaoh's tomb, or your own idea
  • In your book, plan your lock chain: at least three locks, what each one opens, and where its clue is hidden. Every answer must be findable somewhere in the room
  • Type your room's name in the file name box and click Save. Check the .html is in your Downloads
💡 HintPlan backwards. Start at the exit door: what opens it? Where is that clue hidden? What do you need to get there? Working back from the exit stops you building a room nobody can finish.
🔍 Google Image Search"escape room puzzle flow chart"
// ASK AI"Give me 5 escape room settings with a one-line story each, suitable for a school coding project."
02
🧱 Scene Builder
▾
// PHASE OBJECTIVEDemo text replaced with your setting. At least four scenes linked with buttons. Your own colour theme in CSS.
  • Open your .html from Downloads with Open (skip this if the Studio still shows your draft)
  • Every scene is a div with class="scene" and its own id. hidden hides it. A button with onclick="go('vault')" shows the scene whose id is vault
  • Rewrite the demo scenes for your setting, then add new scenes with the boxes below
  • Give your room its own look: add the CSS theme box, then change every colour. Ids must match exactly, so Vault and vault are different names
  • Run, play through every button, then Save
// HTML tab - a new scene (add it above the escaped scene)
<div class="scene hidden" id="vault">
  <h2>The Vault</h2>
  <p>Cold air. Rows of locked boxes. Describe what the player sees here.</p>
  <button onclick="go('lab')">Back to the lab</button>
</div>
// HTML tab - a door to it (add inside the lab scene)
<button onclick="go('vault')">Open the heavy vault door</button>
// CSS tab - a theme (add at the bottom, change every colour)
.scene {
  background: #2b1d14;
  border-color: #a0522d;
  box-shadow: 0 0 40px rgba(255, 140, 0, 0.25);
}

h1, h2 {
  color: #ffb347;
  letter-spacing: 2px;
}
💡 HintClick a button and the whole room vanishes? The id in your go() doesn't match any scene. The status line under the editor shows the error - check spelling and capital letters.
// ASK AI"Suggest a dark, spooky colour scheme for a website as hex codes: background, panel, border and heading colours."
// LEVEL UPGive one scene its own atmosphere. In the CSS tab add a rule for that scene's id, like #vault { background: linear-gradient(#1c232b, #3b0f0f); }, so the vault feels colder and darker than the rest of the room.
Week 2
03
🔒 First Lock
▾
// PHASE OBJECTIVETwo working locks: the number lock rewritten for your room, plus a word lock. Room .html submitted.
  • Read tryLock() in the JS tab line by line. It takes the player's guess, trims spaces, makes it CAPITALS, then uses if / else: the right answer runs go(), a wrong one shows a message
  • Because the guess is made into capitals, the answer you write in the button must be in CAPITALS too, like 'ORBIT'
  • Rewrite the keypad for your room: your own clue, your own four-digit code
  • Add a word lock with the box below, plus a button somewhere that goes to it. Each lock needs its own input id and message id
  • Test both locks with a wrong answer, then the right one. Save and submit your .html
// HTML tab - a second lock: a word lock
<div class="scene hidden" id="safe">
  <h2>The Safe</h2>
  <p>A dial with letters. It wants a five-letter word.</p>
  <input id="lock2" maxlength="5" placeholder="?????">
  <button onclick="tryLock('lock2', 'ORBIT', 'msg2', 'vault')">Open</button>
  <p id="msg2"></p>
  <button onclick="go('lab')">Back</button>
</div>
💡 HintAnswers are compared exactly. 'ORBIT' works, but 'orbit' never will, because the player's guess is always turned into capitals first.
// ASK AI"Explain this JavaScript line to a Year 10 student: const guess = document.getElementById(inputId).value.trim().toUpperCase();"
📤 Submit via ConnectYour room .html from Downloads (two locks working)
// LEVEL UPCount failed tries. Above tryLock add let wrongTries = 0;. In its else, add wrongTries = wrongTries + 1; and change the message to 'Locked. Failed tries: ' + wrongTries. Players now see how many guesses they've wasted.
04
🔍 Hidden Clues
▾
// PHASE OBJECTIVEClues hidden behind objects with reveal(). Every lock answer can be found somewhere in your room.
  • A hotspot is a button that looks like part of the room: a painting, a drawer, a loose brick. Clicking it reveals a hidden clue
  • Add the three boxes below: the hotspot in your HTML, the look in your CSS, and reveal() in your JS
  • Hide the clue for each lock. Spread them out: a clue in one scene can unlock something in another
  • Players should earn the answer, not just read it. Try splitting a code across two clues, or hiding a word in the first letter of each line of a poem
  • Check your plan: can every answer be worked out from what's in the room? Run, test, save
// HTML tab - a hidden clue (add inside any scene)
<button class="hotspot" onclick="reveal('note1')">🪴 The plant pot</button>
<p id="note1" class="hidden clue">Scratched under the pot: ORBIT</p>
// CSS tab - make hotspots look like part of the room
.hotspot {
  background: transparent;
  color: inherit;
  border: 1px dashed #556677;
}

.clue {
  font-family: 'Courier New', monospace;
  color: #9fe8a8;
}
// JS tab - reveal a clue
// Show a hidden clue
function reveal(clueId) {
  document.getElementById(clueId).classList.remove('hidden');
}
💡 HintUse different ids for every clue: note1, note2, note3. Two clues with the same id means reveal() only ever finds the first one.
// ASK AI"Give me 5 ways to hide a password inside a short piece of text, like an acrostic, for an escape room puzzle."
// LEVEL UPMake a coded clue. Write the answer backwards (TIBRO for ORBIT) and put a mirror somewhere in the room as a second clue, or shift every letter one place on (PSCJU) and leave a note saying "one step back". Test it on a classmate.
Week 3
05
🎒 Inventory
▾
// PHASE OBJECTIVEAn inventory array working: at least one item picked up and used to open something. The bag shows in the top bar.
  • bag is an array, a list that grows. push() adds to it, includes() checks for an item, join(', ') turns it into text for the top bar
  • Add the JS box first, then the HTML box. Put the pick-up button in one scene and the locked cabinet button in another, so players have to explore
  • Rename things for your setting: a crowbar, a fuse, an amulet. The name in pickUp() and in useItem() must match exactly
  • Test: try the locked thing before you have the item, then after. Save
// JS tab - the inventory
// Everything the player is carrying
const bag = [];

// Put an item in the bag and hide the button that picked it up
function pickUp(item, buttonId) {
  bag.push(item);
  document.getElementById(buttonId).classList.add('hidden');
  document.getElementById('bag').textContent = bag.join(', ');
}

// Only open the next scene if the item is in the bag
function useItem(item, nextScene, msgId) {
  if (bag.includes(item)) {
    go(nextScene);
  } else {
    document.getElementById(msgId).textContent = 'You need something to open this.';
  }
}
// HTML tab - an item, a locked cabinet and what is inside
<button id="keyBtn" onclick="pickUp('key', 'keyBtn')">🔑 Pick up the small key</button>

<button onclick="useItem('key', 'cabinet', 'msg3')">Unlock the cabinet</button>
<p id="msg3"></p>

<div class="scene hidden" id="cabinet">
  <h2>The Cabinet</h2>
  <p>Inside: a torch and a folded note.</p>
  <button onclick="go('lab')">Back</button>
</div>
💡 HintItem names are compared exactly, so 'key' and 'Key' are different items. Pick one spelling and copy-paste it rather than retyping.
// ASK AI"What does the JavaScript array method includes() do? Show me a short example with a list of items."
// LEVEL UPMake an item get used up. In useItem, right after go(nextScene);, add bag.splice(bag.indexOf(item), 1); then document.getElementById('bag').textContent = bag.join(', ') || 'empty';. Now the key disappears from the bag once it's been used.
06
⏱️ Countdown
▾
// PHASE OBJECTIVEA 10-minute clock that starts on the first click, ends in a caught scene at zero and shows the escape time. Room .html submitted.
  • setInterval runs a function again and again: every 1000 milliseconds, which is once a second. clearInterval stops it
  • Add the JS box. Then, from the HTML box: replace your start button with the new one (it starts the clock), add the exit and caught scenes, and replace your old escaped scene with the new one
  • Point your last lock at 'exit' instead of 'escaped'. The Step outside button there stops the clock and shows the time
  • Test it properly: escape once, and let the clock run out once. For a quick test, change 600 to 20 in both places, then change it back
  • Save and submit your .html
// JS tab - the countdown clock
let secondsLeft = 600;
let clock = null;

// Start the clock once (a second click does nothing)
function startClock() {
  if (clock !== null) {
    return;
  }
  showClock();
  clock = setInterval(function () {
    secondsLeft = secondsLeft - 1;
    showClock();
    if (secondsLeft <= 0) {
      clearInterval(clock);
      go('caught');
    }
  }, 1000);
}

// Show the time as minutes:seconds, e.g. 9:05
function showClock() {
  const m = Math.floor(secondsLeft / 60);
  const s = secondsLeft % 60;
  document.getElementById('clock').textContent = m + ':' + (s < 10 ? '0' + s : s);
}

// Stop the clock and show how long the escape took
function escapeRoom() {
  clearInterval(clock);
  const used = 600 - secondsLeft;
  document.getElementById('time').textContent = Math.floor(used / 60) + ' min ' + (used % 60) + ' sec';
  go('escaped');
}
// HTML tab - new start button, exit and caught scenes, new escaped scene
<button onclick="startClock(); go('lab')">Enter the lab</button>

<div class="scene hidden" id="exit">
  <h2>The Door Swings Open</h2>
  <button onclick="escapeRoom()">Step outside</button>
</div>

<div class="scene hidden" id="caught">
  <h1>Time's up!</h1>
  <p>The lights go out. You are still inside.</p>
</div>

<div class="scene hidden" id="escaped">
  <h1>You escaped!</h1>
  <p>Your time: <span id="time"></span></p>
</div>
💡 HintThe clock should only start once. That's why startClock checks if (clock !== null) first - without it, a second click starts a second clock and time drains twice as fast.
// ASK AI"Explain setInterval and clearInterval in JavaScript with a countdown example."
📤 Submit via ConnectYour room .html with the clock working
// LEVEL UPPanic mode. At the end of showClock add if (secondsLeft < 60) { document.getElementById('clock').style.color = 'red'; }. In the last minute the clock turns red.
Week 4
07
🧩 Puzzle Craft
▾
// PHASE OBJECTIVEAt least three locks of different types. A hint button with three hints that cost 30 seconds each.
  • Good rooms mix puzzle types. Make sure your locks aren't all the same kind:
Number CodeA code built from things in the room: a date, a count of objects, digits hidden in two places.
Word LockA word hidden in an acrostic, written backwards, or shifted along the alphabet.
RiddleA riddle whose answer is the password. Short, fair and only one answer that fits.
SequenceButtons pressed in the right order, with the order hidden in a clue (box below).
Item LockFind an object in one scene and use it in another, with your inventory.
CombinationTwo clues that are useless alone but give the answer together.
  • Add the hint button. Write three hints that get more helpful, not one that gives the answer away. Each hint costs 30 seconds
  • Want a sequence lock? Add the last two boxes and hide the right order in a clue
  • Run, test every lock, save
// JS tab - hints that cost time
const hints = [
  'Something on the wall has a number on it.',
  'Plants can hide things underneath.',
  'The small key opens something with a door.'
];
let hintsUsed = 0;

// Show the next hint, and take 30 seconds off the clock if there is one
function getHint() {
  if (hintsUsed < hints.length) {
    document.getElementById('hint').textContent = hints[hintsUsed];
    hintsUsed = hintsUsed + 1;
    if (typeof secondsLeft === 'number') {
      secondsLeft = secondsLeft - 30;
    }
  } else {
    document.getElementById('hint').textContent = 'No hints left!';
  }
}
// HTML tab - the hint button (add inside the lab scene)
<button onclick="getHint()">💡 Hint (costs 30 seconds)</button>
<p id="hint"></p>
// JS tab - a sequence lock (press buttons in the right order)
const order = ['RED', 'BLUE', 'GREEN'];
let pressed = [];

// Remember each press; check once enough buttons are pressed
function press(colour, msgId, nextScene) {
  pressed.push(colour);
  if (pressed.length === order.length) {
    if (pressed.join(',') === order.join(',')) {
      go(nextScene);
    } else {
      document.getElementById(msgId).textContent = 'Wrong order. Start again.';
    }
    pressed = [];
  }
}
// HTML tab - the sequence lock buttons
<button onclick="press('RED', 'msg4', 'exit')">🔴</button>
<button onclick="press('BLUE', 'msg4', 'exit')">🔵</button>
<button onclick="press('GREEN', 'msg4', 'exit')">🟢</button>
<p id="msg4"></p>
💡 HintFair means a smart player who has seen everything could solve it without reading your mind. If the answer needs a fact that isn't in the room, it's a guessing game, not a puzzle.
// ASK AI"Write a short riddle for an escape room whose answer is a single word, and explain why only one answer fits."
// LEVEL UPA lock that needs two items. Copy useItem, rename it useTwo, give it a second item parameter, and change the test to if (bag.includes(item) && bag.includes(item2)). Now the door needs the fuse and the lever.
08
🐞 Playtest & Patch
▾
// PHASE OBJECTIVETwo classmates have played your room. Bug log written, the biggest problems fixed, a new .html saved.
  • Click Play to open your room full screen in a new tab, then swap laptops with a classmate
  • Silent playtest: they play, you watch and say nothing. Where they get stuck is your data, not their mistake
  • Write a bug log in your book or a Word document with four columns: What happened, Where, How bad (1 to 3), Fixed?. "Too hard", "unfair" and "didn't know what to do" count as bugs
  • Repeat with a second tester, then fix the worst problems first. Change one thing, test, then the next
  • Save
💡 HintTime your testers. If nobody escapes in 10 minutes, your room is too hard for Escape Night. Add hints or make a clue clearer - a room nobody escapes isn't fun, it's frustrating.
// ASK AI"My escape room testers keep getting stuck on the same lock. Give me 3 ways to make the clue clearer without giving away the answer."
// LEVEL UPMake answers harder to spot in the code. In a lock's button, write the answer backwards and flip it back in JavaScript: tryLock('lock2', 'TIBRO'.split('').reverse().join(''), 'msg2', 'vault'). It still unlocks with ORBIT, but anyone peeking at the code sees TIBRO.
Week 5
09
🎨 Final Polish
▾
// PHASE OBJECTIVERoom finished: story intro, ending, polished look, every lock tested. Final .html submitted and ready for Escape Night.
  • Make the first scene grab players: the room's name, one or two lines of story, and why they need to get out
  • Make the ending pay off: the escaped scene tells them what happened next, and the caught scene is a fun "game over"
  • Polish the look in CSS: readable text size, buttons that look clickable, and each scene feeling like part of the same place
  • Run the final check below, then Save. Open the saved .html straight from Downloads (double-click it) to make sure it plays outside the Studio
  • Submit your final .html
✅ Final Room Check
Start to escapePlay from the first scene to the escaped scene with no errors in the status line
Start to caughtLet the clock run out once and check the caught scene appears
Every lockA wrong answer shows a message, the right answer opens the next scene
Every clueEach answer can be worked out from what's in the room
Clock600 seconds, starts on the first click, stops when you escape
💡 HintMake sure your saved file is your newest version. Save, close the Studio, then open the .html from Downloads and play it. If something is missing, you saved too early.
// ASK AI"Write a spooky two-sentence intro and a satisfying one-sentence ending for an escape room set in an abandoned submarine."
📤 Submit via ConnectYour final room .html
10
🏁 Escape Night
▾
// PHASE OBJECTIVEYour room played by the class. Escape times on the leaderboard. Awards voted. Final reflection submitted.
  • Set up your station: open your final .html from Downloads in the browser (not the Studio), on the first scene, ready to go
  • Rules for players: one attempt per room, no View Source, no DevTools, no Room Studio. Hints are allowed and already cost you time
  • Rules for hosts: stay silent, like the playtest. Write down each player's escape time from your escaped scene, or "caught"
  • Play as many rooms as you can. Your fastest escape goes on the class leaderboard
  • Awards, voted by the class: Fastest Escape (best player), Best Room, Best Puzzle and Best Story
  • Write your final reflection: the puzzle you're proudest of, the hardest bug you fixed and how, and what players found hardest in your room. Submit it through Connect
💡 HintWatch where players pause. The spots where most people get stuck are the best feedback you'll get all term - write them down for your reflection.
// ASK AI"Help me write a short reflection about designing and coding an escape room: a puzzle I'm proud of, a bug I fixed, and what players struggled with."
📤 Submit via ConnectFinal reflection
🏁

Escape Night Awaits

After 10 phases your room goes live. Every room gets played, every escape gets timed, and the class votes for the rooms that deserve the Hall of Fame.

🔐 Every room played
⏱️ Fastest escape
🏆 Class awards

Play the demo room, then plan your own // Phase 01

SYSTEM ONLINE // YEAR 9-10 DIGITAL TECHNOLOGY ESCAPE ROOM ARCHITECT // 10 PHASES