{"slug": "solstice-a-light-routing-puzzle-game", "title": "Solstice — A Light-Routing Puzzle Game", "summary": "A developer built Solstice, a light-routing puzzle game with a custom ray-tracing engine, dual-spectrum beam physics, and 18 levels across 7 tiers. The game features a CRT terminal narrative with a Turing test theme, optional AI dialogue via Google Gemini, and is deployed as a static site on Vercel.", "body_md": "*This is a submission for the June Solstice Game Jam*\n\n**What I Built**\n\nSolstice is a puzzle game where you place mirrors to guide light beams across a grid. Each level has two modes — SUN and MOON. You toggle between them to route both beams to their targets. Both need to be lit at the same time to win.\n\nClick a cell to place a `/`\n\nmirror, click again for `\\`\n\n, again to remove. Right-click removes it. Ctrl+Z to undo. That's the whole mechanic — but the levels get hard fast.\n\nThere are 18 levels split into 7 tiers. It starts simple (one mirror, one beam) and builds up to puzzles where you have fewer than 10 free cells and every placement has to count. I verified every level with a Python solver to make sure they're all solvable at the stated par.\n\nThe game has a terminal with a Bletchley Park theme. You get 3 questions, the AI responds like a trapped wartime consciousness, and at the end you decide if it was human or machine. It connects to the Gemini API if you have a key, otherwise it uses pre-written responses.\n\n**VIDEO DEMO**\n\n{[https://youtu.be/gqtylwILuJ8](https://youtu.be/gqtylwILuJ8)}\n\nCode\n\n**A light-routing puzzle game with a custom ray-tracing engine, dual-spectrum beam physics, 18 levels across 7 tiers, a CRT terminal narrative, undo/redo, and a star-based rating system.**\n\nBuilt with vanilla JavaScript, rendered on HTML Canvas 2D, with audio synthesis via the Web Audio API and optional AI-powered dialogue through Google Gemini. Deployed as a static site on the Vercel CDN.\n\nEach subsystem is a standalone ES module communicating through a central game state, orchestrated by a `requestAnimationFrame`\n\ngame loop.\n\n```\nflowchart LR\n    subgraph Pipeline[Core Pipeline]\n        direction LR\n        GL[\"GAME LOOP<br>main.js<br>requestAnimationFrame<br>renderer.draw()<br>updateUI()\"]\n        RT[\"RAY TRACER<br>raytracer.js<br>Dual-pass simulation<br>SUN + MOON paths<br>Cycle detection\"]\n        RD[\"RENDERER<br>renderer.js<br>3-pass canvas draw<br>Glow + dashes + pulses<br>Particle integration\"]\n        PS[\"PARTICLES<br>particles.js<br>emit() / burst()<br>update(dt) / draw()<br>Lifecycle management\"]\n    end\n\n    GL --> RT --> RD --> PS\n\n    style GL fill:#1a1a3a,stroke:#ffd700,color:#ffd700\n    style RT fill:#1a1a3a,stroke:#4a90d9,color:#4a90d9\n    style RD fill:#1a1a3a,stroke:#7b68ee,color:#7b68ee\n    style PS fill:#1a1a3a,stroke:#00ff88,color:#00ff88\n    style Pipeline fill:#0a0a1a,stroke:#333,color:#888\nflowchart TB\n    subgraph Systems[Supporting Systems]\n        direction TB\n        IM[\"INPUT<br>input.js<br>Mouse +\n```\n\n…Play it here: [https://solstice-game-pi.vercel.app](https://solstice-game-pi.vercel.app)\n\n**HOW I BUILT IT**\n\nVanilla JavaScript with HTML Canvas for rendering. No frameworks, no libraries — just ES modules and the Canvas 2D API.\n\nThe ray tracer uses grid-based ray marching. Each frame runs twice — once for SUN, once for MOON. Mirrors transform the direction vector: `/`\n\ndoes `[dx, dy] → [-dy, -dx]`\n\n, `\\`\n\ndoes `[dx, dy] → [dy, dx]`\n\n. Cycle detection prevents infinite loops from mirror pairs facing each other.\n\nAudio is all Web Audio API oscillators — no sound files at all. The terminal uses the Gemini API when configured, with a system prompt that keeps the Bletchley persona consistent.\n\nLevels are hand-designed with increasing wall density. Levels 11-18 went through multiple redesigns after my Python solver kept finding unintended shortcuts.\n\n**Prize Category**\n\nBEST ODE TO ALAN TURING ;\n\nThe terminal is a Turing Test. You talk to something that believes it was a code-breaker at Bletchley Park in 1945. Three questions, then you judge. The dialogue touches on Enigma, ration books, the hum of valves. The ending asks the same question Turing posed — can you tell the difference?\n\nBest Google AI Usage\n\nThe terminal connects to the Gemini API for dynamic responses. The AI stays in character as a wartime consciousness. Without a key it falls back to pre-written dialogue, but with Gemini every conversation is unique.", "url": "https://wpnews.pro/news/solstice-a-light-routing-puzzle-game", "canonical_source": "https://dev.to/vinny_0f23e2d307e45b62614/solstice-a-light-routing-puzzle-game-1827", "published_at": "2026-06-21 17:15:40+00:00", "updated_at": "2026-06-21 18:03:58.147061+00:00", "lang": "en", "topics": ["artificial-intelligence", "generative-ai", "ai-products", "developer-tools", "ai-agents"], "entities": ["Solstice", "Google Gemini", "Vercel", "Bletchley Park", "Alan Turing", "Gemini API", "Web Audio API", "HTML Canvas"], "alternates": {"html": "https://wpnews.pro/news/solstice-a-light-routing-puzzle-game", "markdown": "https://wpnews.pro/news/solstice-a-light-routing-puzzle-game.md", "text": "https://wpnews.pro/news/solstice-a-light-routing-puzzle-game.txt", "jsonld": "https://wpnews.pro/news/solstice-a-light-routing-puzzle-game.jsonld"}}