WikiWayne
Local AIWikiBenchGamesPrompt LabGrok BotAI ToolsTech NewsAboutBlogContact

As an Amazon Associate I earn from qualifying purchases. This site contains affiliate links.

WikiWayne

Independent notes on local AI, real hardware, Grok, and the games that come out of that stack.

Categories

  • Local AI Hub
  • Local AI Glossary
  • Local AI
  • AI Tools
  • Tech News

Quick Links

  • About Wayne
  • Games
  • Grok Bot
  • Contact
  • Links
  • ADHD MaxxxingSponsored
  • WikiBench
  • Methodology
  • Editorial Standards
  • Disclosures
  • Privacy Policy
  • Sitemap

Follow on X

Hardware, local models, Grok, and what I actually ship.

Follow @wikiwayne
WikiWayne© 2026
PrivacyWikiBenchMethodologyEditorialDisclosuresTermsSitemap
Home/Prompt Lab/Night Windows

Night Windows

PL-172EasyCities & buildingsCanvas 2D

City windows that switch off one at a time, with counters that match every visible change.

Night Windows
Download fileMade for ChatGPT, Claude, Gemini, Grok and other AI tools

How to run

  1. Download the file or copy the prompt.
  2. Upload or paste it into any AI chat or coding tool, and send.
  3. Save the HTML it gives you as a file and open it in Chrome.
  4. Open it with ?test=1 and look in the browser console for the TEST lines.

What it tests

City windows that switch off one at a time, with counters that match every visible change.

The checks

  1. At t = 0 there are exactly 14 buildings and 240 windows, at least 210 of them lit, the clock reads 9:00 PM, and the skyline is at least 60% of the screen height.
  2. Over advance(24), the number of lit windows only ever goes down (no taps), no frame has more than 2 switch-offs, and exactly 8 windows are lit when the clock reads 12:00 AM.
  3. windowsOff equals the real drop in lit windows, and windowsOn stays 0 until the wake-up begins.
  4. chimes goes from 0 to exactly 12 at midnight, spaced 0.2 s apart (within 0.05 s), and never changes at any other time.
  5. After advance(29.5) from the start the city has woken: at least 230 windows are lit again, windowsOn equals the number of windows switched back on, the clock reads 9:00 PM, and there are zero console errors.

Runs by model

No runs posted yet. Be the first: post yours and tag @wikiwayne.

Show the full prompt
NIGHT WINDOWS: The City Goes to Sleep
HOOK OBJECT: window.__midnight

Build "NIGHT WINDOWS": a glowing city skyline in Canvas 2D (no libraries) where the lit windows switch off one by one as a clock runs from 9 PM to midnight. Only a few night-owl windows are still lit when the clock chimes twelve. It is one quiet motion and surprisingly soothing to keep watching.

LOOK
- Style: flat nighttime vector skyline with soft glows. Sky gradient #0A1030 (top) to #3A2A6A (horizon). Buildings in #121A3A, #18214A and #0F1633 (three depths), each with a faint lighter edge on its left side. Lit windows #FFD27A with a small warm glow; dark windows #1C2550.
- Exactly 14 buildings of different widths (70–150 px at 1280x720, scale with the screen) and heights, standing side by side with small gaps, covering the full screen width. Together they have exactly 240 windows (small rectangles about 10 x 14 px in tidy grids).
- A round moon (#EDEBFF, 60 px across) and 40 tiny stars in the sky. A big clock in the upper left corner of the sky shows the time as digits (for example "9:00 PM"), never over a building.
- FIRST FRAME (t = 0, no input): the skyline fills at least 60% of the screen height, at least 210 of the 240 windows are lit, the clock reads "9:00 PM", moon and stars visible.

MOTION / PLAY
- The clock runs from 9:00 PM to 12:00 AM in 24 s of simulated time. Windows switch off one at a time in a fixed random order (use the seed): each switch-off takes 0.15 s (a quick flicker, then dark). The switch-offs are spread so that no more than 2 happen in the same frame, and by 12:00 AM exactly 8 windows are still lit.
- At 12:00 AM the clock flashes and strikes 12 times, one strike every 0.2 s (each strike makes the clock pulse once). Then the city holds still for 1 s.
- Then the city wakes: over 2 s all windows that are dark switch back on in a quick random ripple (each one visibly turns on), the clock resets to 9:00 PM and the loop starts again. One full loop is about 29.5 s.
- Controls: tap or click a window to toggle it on or off (it flickers, and counts as a switch-on or switch-off). Hold the Space bar (or hold a finger on the clock) to run time 3x faster.
- ATTRACT MODE: with no input, a hands-free demo starts on load and loops every 25–30 s, showing every main feature (the whole 9 PM to midnight run, the chimes and the wake-up ripple). Any input takes over; the demo resumes after 8 s with no input.

SOUND
- A soft low city hum that gets quieter as the windows go dark.
- A tiny electric "tick" each time a window switches off.
- A deep bell for each of the 12 midnight strikes.
- A rising soft "shimmer" during the wake-up ripple.

COUNTERS
stats() returns { fps, windowsOff, windowsOn, chimes }.
- windowsOff: +1 exactly when a window finishes switching off and is visibly dark.
- windowsOn: +1 exactly when a window finishes switching on and is visibly lit (including the wake-up ripple and your taps). Never on load.
- chimes: +1 for each midnight bell strike, with the clock pulsing.
- On screen: the three counters in a small row at the bottom-left over the dark ground, readable in a paused frame and never over a window.

CHECKS for ?test=1
With ?test=1, run an accelerated self-test that measures real positions and real events (not self-set flags) and logs "TEST n PASS" or "TEST n FAIL: reason" to the console and to window.__testResults:
Each check starts from a fresh load; advance() steps in 1/60 s increments.
1. At t = 0 there are exactly 14 buildings and 240 windows, at least 210 of them lit, the clock reads 9:00 PM, and the skyline is at least 60% of the screen height.
2. Over advance(24), the number of lit windows only ever goes down (no taps), no frame has more than 2 switch-offs, and exactly 8 windows are lit when the clock reads 12:00 AM.
3. windowsOff equals the real drop in lit windows, and windowsOn stays 0 until the wake-up begins.
4. chimes goes from 0 to exactly 12 at midnight, spaced 0.2 s apart (within 0.05 s), and never changes at any other time.
5. After advance(29.5) from the start the city has woken: at least 230 windows are lit again, windowsOn equals the number of windows switched back on, the clock reads 9:00 PM, and there are zero console errors.

KEEP IT SHORT
- Keep the whole file under about 1,500 lines (soft target) so you can write it in one pass and finish well inside 15 minutes.
- Save lines with helpers, loops and instancing, not by dropping features. Everything above must really work: no placeholders, no TODOs.

BUILD RULES (all required):
- Deliver ONE self-contained HTML file: inline CSS and JS, no build step, no local assets. Libraries only from a CDN. If you use Three.js, use exactly this import map: {"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/"}}
- It must open straight from disk in desktop Chrome and on an iPhone (Safari), fill the full screen, handle resize and touch, and stay smooth (target 60 fps).
- It must look stunning in the very FIRST frame: no black screen, no loading wait, no tiny subject. The main subject fills at least 50% of the screen height.
- SOUND (required): all sound is made in code with Web Audio (no audio files). Show a small "🔊 TAP FOR SOUND" chip; on the first tap create ONE AudioContext, route everything through a master gain of 0.6 into a DynamicsCompressor, and hide the chip. Also expose enableAudio() on the hook object named at the top.
- Expose the hook object named at the top with: setCameraOrbit(azimuthDeg, elevationDeg, distance) (or an equivalent camera setter), advance(seconds) that steps the simulation exactly that much for still captures, enableAudio(), and stats() returning {fps, ...the counters named above}. Use a fixed random seed of 360 so every run is the same.
- Every on-screen counter must count a real event you can see happen. No fake numbers.
- No text overlapping the subject; any label must be readable in a paused frame.
- No brand logos, no real people, no copyrighted characters, brand names or logos.

FAILURE MODES TO AVOID
- A blank page, or only the HUD on a black page, because one script error killed the scene.
- A scene far too dark to read, so you cannot tell lit windows from dark ones.
- Windows that all switch off at once, or in a left-to-right sweep instead of one by one in random order.
- Lit windows that never get as low as 8, or a count that does not match what you see on screen.
- Counters that tick on a timer instead of when a window visibly switches.
- A clock drawn over a building, or a counter row drawn over the windows.
- The wake-up ripple missing, so the loop jumps instead of the windows visibly turning back on.
- The same variable declared twice, or methods called on objects that don't exist yet.

SELF-TEST LOOP
- If you can run code: build the file, open it, read the console, run ?test=1, and take screenshots at 3 s, 10 s and 30 s at 1280x720 and 390x844. Look at the screenshots and fix what looks wrong. Fix and retest until all 5 checks pass with zero console errors. Mark anything you could not run as UNMEASURED; never invent results.
- If you are chat-only: go through this prompt line by line, check your code against each line, and fix anything that would fail. Then write one corrected, complete file.
- Final answer: ONE complete HTML file in ONE code block, then the 5 checks marked PASS, FAIL or UNMEASURED. No snippets, no "rest unchanged".

Built one? Post it on X and tag @wikiwaynePost on X

More Easy prompts

Bouncing Bubbles

EasyFluids & particles
PL-0644 runs

Glass Weather

EasyPage layouts & UI
PL-0634 runs
Sleepy Owl

Sleepy Owl

EasyCreatures & characters
PL-179No runs yet

More Cities & buildings prompts

Endless Neighborhood Day

Very HardCities & buildings
PL-0764 runs
Four-Way Signals

Four-Way Signals

MediumCities & buildings
PL-180No runs yet
Sydney Opera House

Sydney Opera House

HardCities & buildings
PL-104No runs yet