Inspiration

Crowd crushes don't start with a stampede. They start when too many people stand in too little space, and nobody nearby can tell. Crowd-safety guidance from G. Keith Still's crowd science puts the danger point for a standing crowd at about 5 people per square metre, and the UK Green Guide caps standing areas at 4.7 per m². Above that, surges and crowd collapse become possible.

The problem is perception. From eye level, a crowd of 4 per m² and a crowd of 6 per m² look almost the same. The people who decide when to close a door or open another exit are often student organisers and volunteer stewards, briefed with a number on a safety plan. That number means little until you've stood inside it. I wanted a way to stand inside it safely, in your own venue, before the doors open.

What it does

Redline is a Specs Lens that fills your real floor with a life-size ghost crowd at a density you choose.

  • Fit the zone to your space. A rectangle appears on the floor about 1 m ahead. Drag its corner handles anywhere from 2 × 2 m to 10 × 10 m. Floor labels show the area and how many people it holds at 2 and at 5 per m², for example "12 m², 24 people at 2 per m², 60 at 5 per m²".
  • Set the density with one slider, 0 to 7 people per m². The zone fills with exactly N people in every full square metre and exactly round(N × area) in total: standing figures 155 to 185 cm tall, in five shades, all facing the stage.
  • Know the level without reading a number. The floor turns green ("Room to move"), amber ("Getting tight") and red ("Past the redline"). Each slider step ticks softly. Crossing up past 5 plays one low, calm tone, like a weight settling rather than an alarm. A spatial crowd murmur thickens as the crowd packs in.
  • Walk into it. Bodies within 0.6 m of you fade so you can stand in the middle, but their footprints stay, so the density stays honest. Look down at the highlighted square metre and count the pairs of feet.
  • Watch it move. At 6 and 7 per m², a slow wave rolls through the whole crowd, the way packed crowds start to move as one.
  • Train your eye. Test your eye fills the zone at a hidden density from 2 to 7 and hides the giveaways: the number, the floor colour and the count. Guess with the slider and pinch Check. Redline shows the truth on a top-down map with one dot per person: "You guessed 4, it was 6".
  • Never lose the zone. If it leaves your view, an arrow on the floor points back to it.

Who it's for

Student event organisers and volunteer stewards who run gigs, college fests, graduations and sports events, and have to judge by eye when a space is getting dangerous. Redline is a trainer you use in an empty venue an hour before the doors open. It is a training tool, not a certified safety system, and it must not be used to set capacities.

Why it belongs on glasses

On a phone, density is a picture you look at. On Specs, it's bodies standing on your own floor at true scale, and you walk into them with your hands free and your eyes up. Redline draws in the world, with the crowd at real size in the real room. It also leaves your body free: you walk through the crowd, look down at the feet, and get pointed back if you turn away. The clipboard rides just below your line of sight, so you never look away from the crowd to read the number.

How I built it

This is my first Lens. I built it with an AI agent in a plan, build, test loop:

  1. Plan. The Devpost Learn skill pack's plan-lens skill interviewed me and wrote devpost/design-brief.md: one spatial moment, where every element sits (in centimetres), and six done criteria that can each be checked in the preview.
  2. Build. CLAD in Claude Code built the Lens from the brief, working inside the open Lens Studio 5.24 project through the Lens Studio MCP. I reviewed every build in the Interactive Preview (SPECS 27) and fed back design notes rather than code, such as "the clipboard covers the crowd" or "the ghosts look like haze".
  3. Test. CLAD wrote LEAF scenarios for the done criteria, ran them in the preview through the MCP (list_leaf_scenarios, run_leaf_scenario) and fixed what failed.

Architecture (TypeScript)

  • RedlineGeometry is pure, unit-tested maths. A jittered grid aligned to the centre square gives exactly N people in every full square metre and round(N × area) in total, with no body within 22 cm of the outline.
  • RedlineCrowd keeps a pool of ghost bodies. Each of the five shades shares one material pair, so bodies batch, and a body gets its own material only while it fades. Every body sways, and a shared wave runs at 6 and 7 per m².
  • RedlineZoneView draws the outline, floor tint, draggable corner handles and return arrow. Its in-view check samples only the outline, to keep per-frame work low.
  • RedlineClipboardUI is built with Spectacles UI Kit (FlexLayout, Slider, Buttons) and Spectacles Interaction Kit, so it works with the mouse in the preview and with hands on Specs.
  • RedlineMain handles the modes (setup, density, Test your eye), floor finding with a virtual-floor fallback, and sound.

CLAD skills used: specs-build-ui (clipboard hierarchy, spacing, hit areas), specs-interaction-recipes (handles and buttons), specs-audio and build-sfx (the ticks, tone and murmur, generated with no samples), font-selector (Archivo Black), icon-selector (Material Symbols) and specs-leaf-write-scenarios.

Design decisions that shaped it

  • Solid, dim blue-grey ghosts in five shades. The display adds light, so black is invisible, and translucent white figures merged into a white haze at 5 per m². The shades make neighbours read as separate people.
  • A calm tone, not an alarm. G3 (196 Hz) with a soft octave and fifth, and a slow decay. An alarm says "something broke"; the redline should feel like a weight settling. G3 also stays above the roughly 150 Hz limit of small glasses speakers.
  • Ticks you can feel. Each step makes an 80 ms tick. Steps down are 2 semitones lower and about 4 dB quieter, so easing off sounds like easing off.
  • Targets sized for hands. The buttons are 8.2 × 4 cm and the slider's hit area is 3.6 cm tall. That meets Specs' guidance of about 3.5 cm at the clipboard's reading distance.
  • Four clipboard iterations. It started at 30 × 20 cm (covered the crowd), moved to waist height (out of view), then became see-through just below the line of sight. The current version holds still while you aim at it and has a Pin button.

Testing and evidence

Every done criterion has an automated LEAF test, run inside the Lens Studio 5.24.1 preview (SPECS 27, Interactive):

  1. Dragging a corner resizes the zone and updates the labels; Done hides the handles. c1-zone-resize-and-done: passed
  2. Slider value N gives N × area ghosts, and exactly N pairs of feet in the centre square. c2-slider-fills-crowd: passed
  3. The floor turns green, amber, then red, and the tone plays exactly once on crossing up past 5. c3-floor-colour-and-tone and r8-redline-tone-once: passed
  4. No visible body within 0.6 m in the middle of the crowd, and the counts stay true. c4-clear-circle-in-the-middle: passed
  5. An arrow appears when the zone is out of view. c5-arrow-when-zone-out-of-view: passed
  6. Test your eye: hidden density, guess, Check, map, Stop test. r9-test-your-eye-round: passed

Two more scenarios also pass: r6-sway-and-murmur and r7-clipboard-redline. npm test runs 7 of 7 geometry checks in Node. Those checks caught a real bug the Lens tests missed: a strip of zone thinner than 22 cm pushed one person into the next square metre, which then held N + 1.

I've separated what is proven from what isn't. Proven in the preview: every behaviour above works as specified. Unproven until real Specs: comfort over time, real hand tracking, how the crowd reads through the narrow field of view, and frame time at the largest setting (10 × 10 m at 7 per m² is 700 figures).

Challenges I ran into

  • Tests that pass while clicks fail. LEAF presses UI Kit buttons directly, so every test passed while real mouse clicks on the clipboard weren't reaching its buttons. In one session, an injected click through the MCP (InjectPreviewGesture) on Done also reached no button. The panel now holds still while you aim at it, sits higher in view, and has a Pin button.
  • The additive display. Black is transparent and dark content vanishes. The scene had even saved the ghosts as black, which shows as see-through, so every visible element had to be designed as light.
  • A narrow field of view. At about 37° tall, the crowd and the clipboard compete for the same small window.
  • Honest numbers. Exact counts per square metre for any zone size, without bodies poking past the outline, took careful layout maths and a self-check across many sizes.

Accomplishments I'm proud of

  • A crowd you can walk into, with a density you can count at your own feet.
  • Test your eye, which turns a demo into practice.
  • A clear evidence trail: a design brief, a design log of changes and their reasons, an automated test for every done criterion, and a clear line between what's proven and what isn't.

What I learned

AR on glasses has its own rules: dark means invisible, the view is small, and UI belongs where you're already looking. Planning one spatial moment before building kept the agent focused. Automated tests are great for logic, but aiming and clicking still need a human. And a calm tone instead of an alarm turned the redline into something you feel, not read.

What's next

  • Run it on real Specs: comfort, hand-tracking pinches, and frame time with hundreds of figures.
  • Find the room's walls and exits automatically instead of fitting the zone by hand.
  • Several saved zones, so a steward can walk a whole venue: the stage front, the bar, the exits.
  • A scored Test your eye series that shows how a steward's judgement improves over time.

Sources

Built With

Share this project:

Updates

Submission history