This is a submission for the June Solstice Game Jam
What I Built
The Imitation Gate is a deduction game similar to "Papers, Please" about the Turing test, played from the examiner's chair.
Solstice week, June 17–21, 2026. You staff the Solstice Gate, the border between the dark and light halves of the year. Travelers approach with papers and a claimed home city. Some are human. Some are machines imitating humans. You interrogate them on a daylight budget and stamp ENTRY or HOLD.
What makes it a game and not a vibes-guessing chat: your rulebook is the actual sky. The in-game almanac (the "Daylight Ledger") is computed at runtime by a real solar engine. Day lengths, sunset times and compass bearings, twilight classes, noon shadow directions, festival dates, all for nine cities from Tromsø (69°N) to Ushuaia (55°S). Machines answer like textbooks and get the lived sky wrong. Humans are messy, strange, and right.
Some of my favorite tells, all astronomically true:
- A "Tromsø local" who watched the sunset last night. The sun hasn't set there since mid-May.
- A "Stockholmer" who admired the stars over the water at midnight. Stockholm's June sky never gets darker than nautical twilight. No stars until August.
- A "Singaporean" enjoying the long June evenings. Singapore's day length varies nine minutes across the entire year.
- A "Sydneysider" whose noon shadow points north. In the southern hemisphere's June, the sun is due north at noon; shadows point south.
- A "Kiwi" celebrating Matariki on the solstice. Matariki follows the Pleiades' rising; the 2026 holiday is July 10.
And the traps cut both ways: hold the honest Reykjavik researcher because you "knew" the whole far north has midnight sun (Reykjavik is below the Arctic Circle, its sun sets for ~40 bright minutes), and you'll read what your wrong stamp cost her.
The five nights descend the globe: Tromsø → Stockholm → Cairo → Singapore → Ushuaia. Your daylight budget is each city's true day length: 24 hours under the midnight sun, then 18.6, 14.1, 12.2… and 7h13m on the year's shortest day, where you can no longer interrogate everyone and must spend the sun like blood. The jam's opening line, longest day for half the world, shortest for the other half, is the difficulty curve. You play both solstices.
Between nights, the story follows the man the test is named for: born June 23, 1912, two days after the solstice; Bletchley; the 1952 conviction; June 7, 1954. The final traveler at the final gate is a machine that refuses to imitate. It declares itself and asks for passage anyway. The rulebook says HOLD. Both stamps end the game. Neither is scored. That question is the whole point:
The machine's crime was passing the test. Turing's crime was failing one he never agreed to take.
Demo
🎮 Play (browser, desktop & mobile, no install/account): imitation-gate-2lkxoqgeqq-uc.a.run.app
📦 Source:
The Imitation Gate
A solstice border-checkpoint deduction game for the DEV June Solstice Game Jam 2026.
You are the examiner at the Solstice Gate — the border between the dark and light halves of the year. Five nights, June 17–21. Some travelers are human. Some are machines that have read everything and lived nothing Your only instrument is the Daylight Ledger — an almanac of real solar astronomy. The sky keeps the score.
The machine's crime was passing the test. Turing's crime was failing one he never agreed to take.
Play
It's one HTML file. No server, no install, no account, no API key.
- Open
imitation-gate.htmlin any browser (double-click works — it runs fromfile://), or - Serve the repo root statically (
index.htmlis the same file)
How it plays
- A traveler approaches with papers: name, claimed origin city, purpose.
- Ask questions from the deck — each…
▶️ Youtube:
The whole game is one self-contained ~270 KB HTML file. It runs offline, from file://, from anything. Story mode (5 nights, 21 hand-written travelers) needs no network at all.
How I Built It
Stack: TypeScript + React 18 + Zustand, bundled by esbuild into a single inline-everything HTML file. Canvas for the sky and the procedural traveler silhouettes; Web Audio for synthesized foley (the stamp thunk is a filtered noise burst + 120→50 Hz sine knock, no audio assets anywhere). No engine: a checkpoint game is documents and dialogue, which is what the DOM does best.
The solar engine is the game design
The core of the project is ~150 lines of dependency-free astronomy (src/lib/solar.ts): NOAA solar declination, the refraction-corrected sunrise equation, sunset azimuth from spherical trig, and a twilight classifier (midnight sun / bright night / white night / deep twilight / true night).
// the heart of it: refraction-corrected hour angle
const h0 = -0.8333 * DEG; // solar disc + atmospheric refraction
const cosH =
(Math.sin(h0) - Math.sin(lat) * Math.sin(dec)) /
(Math.cos(lat) * Math.cos(dec));
// cosH < -1 → midnight sun · cosH > 1 → polar night
// otherwise day length = 2·acos(cosH)·12/π hours
Everything downstream grows from it: the almanac text the player reads, each night's daylight budget, the sky renderer's palette (Stockholm's white-night strip never goes black; Cairo gets real stars), and the procedural travelers' truthful answers. I unit-tested it against published ephemerides for all nine cities, within ±8 minutes everywhere (test file). When a game's central mechanic is "the almanac is never wrong," the almanac had better not be wrong.
The Daylight Ledger — computed almanac for each city

The best verification moment: my own test caught me assuming Reykjavik has the midnight sun. It doesn't. 64.1°N is below the Arctic Circle, so the sun sets for about 40 minutes and the night never darkens past civil twilight. That bug became Brynja, the Night 1 traveler whose truth sounds like a lie.
Two test suites, because jam games die at the demo
A headless simulation drives the entire game through the real Zustand store: a "perfect examiner" run (all 21 travelers, correct verdicts, daylight accounting checked per question) and a "spendthrift" run that burns every question to verify the sunset cutoff degrades gracefully. Plus 200 generated endless-mode cases asserting every machine has one wired, almanac-violating lie. node build.js --test runs everything.
Art direction: a risograph checkpoint, one booth, five skies
The whole game shares a single illustrated motif: a lone lit checkpoint booth on an empty plain, a queue of faceless silhouettes holding papers, heavy screen-print grain. Only the sky changes with latitude.
Tromsø's amber midnight sun

Stockholm's starless lilac white-night
Cairo's deep indigo with a real constellation over a minaret skyline
Singapore's humid teal dusk where the travelers stand ankle-deep in still water

Ushuaia's parka-clad line under low midwinter light

I generated the anchor image first, then produced the other four against it as a style reference so the series stays coherent, hand-tuned them, and shipped them as ~60–120 KB WebP. They're progressive enhancement: every screen has a solid fallback colour, so the game paints instantly and plays even before the art loads (or offline).
Feel, score, and a shareable result
Small things, because execution is a scored criterion: a synthesized stamp thunk and a per-latitude ambient drone (pure Web Audio, no asset files), paper that slides onto the desk as each traveler steps up, a green/red verdict flash, a 30-second guided first traveler so a new player gets the loop right away, full keyboard play (1–5 to ask, E/H to stamp), and an Examiner's Rank with a Wordle-style 🟩🟥 share card (Web Share on mobile, clipboard on desktop). Wrong verdicts carry a human cost line: "Sigrid Holm spent the night in the holding room; her sister was married under the midnight sun without her."
Depth without the AI: a deterministic rule engine
The trap with an "AI border guard" game is leaning on the model for variety. I went the other way: the variety and tension are deterministic systems layered on the solar engine, so the game is deep and replayable with no AI at all.
- A directive rulebook. Each shift the Gate posts stacking rules: "entry permits issued after 15 June are void," "southern-hemisphere crossings closed tonight," "papers must match the traveler's own account." A verdict is now a cross-check: is the sky claim a lie and does the paperwork satisfy tonight's directives? The binary became a layered judgment.
- A stakes economy. Standing is your health (run ends at zero); Authority is currency you earn by being right, and spend on DETAIN & SEARCH for a lead. Combo multipliers reward streaks; naming the correct violation before you stamp pays a bonus.
- The Daily Gate. A date-seeded shift: the same queue, directives, and conditions for everyone that day, with a shareable 🟩🟥 score. (Wordle's loop, which also happens to feed DEV's reaction-based tiebreak.)
- Roguelike modifiers on the Long Shift: Fog hides an almanac line, Heavy Paperwork adds a directive, High Stakes doubles the swing, drawn from the seed.
All of it is pickDirectives(seed), resolveCase(traveler, directives), and a seeded RNG. Verifiable, debuggable, and covered by a headless test that plays full runs. The AI is a garnish, not the engine.
Endless mode: the machine generates the liars
Story mode is hand-written, but The Long Shift generates travelers forever: pick a city, compute its almanac, give humans the truth with local texture, and give machines one seeded lie drawn from a bank of plausible-wrong beliefs (imported hemispheres, remembered-from-books festivals, stars that aren't there). Difficulty ramps with your streak: early lies are loud ("watched the sunset in Tromsø"), late ones are quiet ("Midsommar is the last weekend of June," when it's pinned to June 19–25, and in 2026 it's tomorrow).
Prize Category: Best Ode to Alan Turing
The game is the imitation game, with the chairs rearranged. Turing's 1950 paper proposed judging machines by interrogation; this game puts you in the interrogator's seat and then asks the question he left underneath: what does the examiner owe the one who stops pretending?
It's also an ode to his method. The Bletchley bombes didn't read minds. They hunted contradictions: a rotor guess that forced a letter to encrypt to itself was impossible, and died. The Daylight Ledger is that idea worn as a border post. You don't intuit who's a machine; you hold the impossible against the claim, there were no stars over Stockholm last night, and the contradiction does the rest. The interstitial vignettes carry his June-bound biography (born two days after the solstice; dead two weeks before it), and the Pride-month connection is load-bearing: the finale is about a system that punishes beings for what they are while rewarding convincing pretense, and about the person holding the stamp.
Prize Category: Best Google AI Usage
Gemini plays the impostors, at runtime, with full disclosure.
🩺 Verify it's live right now: /api/health — returns "gemini": true when the key is active and the model name in use.
When you play at the hosted URL, Gemini 3.1 Pro voices every impostor. The key lives on a Cloud Run server (Secret Manager), never in the browser. Each generated case is re-voiced via the Gemini REST API: the model receives the city's computed fact sheet, a cover-story persona, and, if it's playing a machine, the exact lie it must weave in without confessing. Structured JSON output, one call per traveler, prefetched while the traveler walks up. Playing offline? Paste your own free-tier key in The Long Shift, or skip it: the dossier voice takes over and the game plays the same.
Two design decisions I want to be transparent about, because they're the interesting part:
- The truth never comes from the model. The seeded lie and the verdict logic live in deterministic code; Gemini improvises the voice around them. A hallucination can't corrupt the game. At worst it makes an impostor easier to catch, which is the right failure mode.
- The fallback is total. No key, network failure, quota, malformed JSON: the dossier voice takes over. The game never depends on the API to be playable. (I gave the same courtesy to the judges: story mode is 100% offline.)
The result is the inverted Turing test made playable: a human examiner interrogating a live language model that is trying to pass, and a deterministic almanac as the tiebreaker.
What I'd do next
Persona memory across a Long Shift session (impostors that learn which questions you favor) and more cities. I want Nairobi (equatorial, but a hemisphere trick: it's just south), Anchorage, and Punta Arenas.
Thanks for reading. If you only have two minutes: play Night 1, ask about the light, then open the Ledger. The sky does the rest. ☀️











Top comments (0)