DEV Community

Cover image for Solstice Cipher: The Turing Test of Light and Shadow
REX
REX

Posted on

Solstice Cipher: The Turing Test of Light and Shadow

June Solstice Game Jam Submission

What I Built

Solstice Cipher: The Turing Test of Light and Shadow is a premium, retro-futuristic browser-based puzzle and narrative game.

The game combines two core ideas:

  1. Light & Shadow Routing Puzzles (The Solstice Theme): Players align optical mirrors, prism splitters, and color filters on a coordinates grid. A central "Solstice Toggle" shifts the cycle from Day to Night, dynamically updating the active light sources and receptors, requiring the routing algorithm to adapt.
  2. Conversational Turing Tests (The Alan Turing Theme): Calibrating the light beams decrypts a "digital consciousness." Using a vintage CRT computer terminal, players query the decoded mind to run a Turing Test, determining whether they are talking to a simulated AI or a reconstructed human consciousness.

Our goal was to design a beautiful, high-fidelity gaming experience that celebrates Bletchley Park decryption, and Juneteenth, while showcasing local security safety and dynamic generative conversations.

Code

The repository is open-source and hosted entirely on GitHub:

GitHub logo REXREUS / Solstice-Cipher

Solstice Cipher: The Turing Test of Light and Shadow is a premium, retro-futuristic browser-based puzzle and narrative game.

🌌 SOLSTICE CIPHER: The Turing Test of Light and Shadow

A premium, retro-futuristic browser-based game of optical logic and conversational Turing tests. Created for the June Solstice Game Jam 2026.


🎮 Game Overview

Solstice Cipher combines two core elements:

  1. Light & Shadow Routing (The Solstice Theme): Solve optical routing puzzles on a coordinates grid. Align mirrors, prism splitters, and RGB color filters to connect emitters to receivers. Toggle the Solstice Cycle (Day & Night) to dynamically shift active lasers and receptors, requiring adaptive algorithms.
  2. Conversational Turing Tests (The Alan Turing Theme): Decrypting the light beams stabilizes a "digital consciousness". Interact with the decrypted entity through a vintage phosphor-green CRT terminal. Chat, detect logical inconsistencies, and declare your Turing Test verdict: is it a reconstructed Human Mind or a statistical AI Emulation?

✨ Features & Visual Excellence

  • Frosted Glassmorphism HUD: Transparent panels featuring heavy backdrop blurring, responsive…

How I Built It

The project is built entirely as a single-page application using React, Vite, and Vanilla CSS with no external CDN assets.

1. Interactive HUD & Glassmorphism Design

Instead of rendering on a flat 2D canvas, we designed a cybernetic HUD:

  • Frosted Glass Panels: Semi-transparent HSL colors coupled with heavy backdrop blurring (blur(25px)). Active panels feature animated borders that pulse with keyframe glows.
  • Drifting Gas Nebulae: An animating canvas drawing twinkling stars, cosmic dust particles, shooting stars, and rotating nebulae (warm solar wind in Day cycle, violet/cyan clouds in Night cycle).
  • Holographic SVG Nodes: Custom vector drawings for blocks (hazard caution stripes), splitters (refracting prisms), mirrors (calibration gears), emitters (nozzles that rotate towards direction), and receivers (featuring concentric calibration rings that rotate in opposite directions).
  • Oscilloscope Waveform Widget: A canvas-based telemetry display in the sidebar drawing procedural sinus waves that speed up and fluctuate based on active lasers.
  • CRT Matrix Rain: The vintage CRT screen uses phosphor scanline gradients, vignette overlays, and a low-opacity falling binary Matrix stream in the background behind message cards.

2. Raycaster Engine

A recursive Depth-First Search (DFS) raycast engine calculates light propagation:

  • Translates mirror angles (45°/135°) to redirect paths.
  • Computes split rays at prisms.
  • Validates wave colors through Red, Green, and Blue filter chambers.
  • Infinite Loop Prevention: Tracks coordinates and incoming vector directions to stop infinite reflections.
  • Spawns spark nodes and expanding waves at all reflection and absorption junctions.

3. Procedural Audio Synthesis

All clicks, snaps, alarms, success arpeggios, and baseline laser hums are generated procedurally using the Web Audio API oscillators (zero audio asset downloads required).

4. Client-Side secure Key Storage

To protect user keys:

  • Implements locally salted encryption using stretch hashing and XOR ciphers.
  • Detects Gemini API keys in local storage and prompts for the user passphrase to decrypt them strictly in-memory.
  • Falls back to a robust keyword-matching local simulator dialogue if offline or key is cleared.

Prize Category

Best Ode to Alan Turing

  • Imitation Game Mechanics: The core progression centers on Turing's benchmark. Players chat, examine logical contradictions, and submit verdicts.
  • Bletchley Park Cryptography: Level 1 (Turing Machine) and Level 5 (Turing's Dream) pay direct tribute to Turing's computing limits, Turing Test philosophy.

Best Google AI Usage

  • Google Gemini API: Full integration with gemma-4-26b-a4b-it for open-ended philosophical AI dialogue.
  • Persona Context Mapping: System instructions mold dynamic replies based on NPC backstories (academic Turing-AI, multiple choral voices in Freedom Collective, mythical clockkeeper Warden, and flowers-in-hair activist Marsha-AI).

Top comments (0)