cd /news/artificial-intelligence/i-built-an-on-device-solstice-engine… · home topics artificial-intelligence article
[ARTICLE · art-35351] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

I Built an On-Device "Solstice Engine" Using TensorFlow.js to Break Ciphers

A developer built an on-device 'Solstice Engine' using TensorFlow.js to break ciphers in a browser-based puzzle game. The game, Solstice Cipher, uses real-world light levels detected via webcam to alter cryptographic logic, requiring players to physically change lighting conditions to decode messages. The project is open-source and runs entirely client-side with no backend servers.

read2 min views1 publishedJun 21, 2026

This is a submission for the June Solstice Game Jam

I wanted to build something that forces the player to look around their room, grab a flashlight, or turn on the light, and interact with the physical world!

Solstice Cipher is an atmospheric, browser-based puzzle game inspired by Alan Turing’s legendary code-breaking machines and the beautiful transitions of the June Solstice. The game challenges players to step into the shoes of a wartime cryptanalyst to intercept and decode three hidden binary messages celebrating June milestones.

Just like the solstice marks a shifting point between light and darkness, this machine’s cryptographic system alters its logic based on the actual, real-world light in your room. To fully break a cipher, you have to decipher cryptic riddles and physically shift your environment between Day Mode (shining a light at your webcam) and Night Mode (covering the lens) to calibrate both mechanical rotors!

Take a look at the "Solstice Engine" in action!

The entire project is completely open-source, free, and lightweight (built using HTML, CSS, and client-side JavaScript). You can explore the repository or host your own version below:

Building this was an absolute joy and a fun logic puzzle in its own right! I wanted to ensure the game was 100% free to run, private for the player, and required zero backend servers or complicated API keys.

navigator.mediaDevices.getUserMedia

), the app securely requests access to a localized 320x240 video matrix.app.js

to feature persistent memory flags (dayCalibrated

and nightCalibrated

). Now, the engine securely holds its state when you successfully align a rotor, politely guiding you to switch from flashlight to shadow to finish the job.style.css

) to create that clandestine, high-stakes "secret bunker" aesthetic.This game is an ode to the father of modern computing. Instead of a standard clicker game, the mechanics intentionally simulate the interactive physical dial-tuning of the Enigma-decrypting Bombe machines. The puzzles themselves lean heavily on binary data arrays and computational logic definitions, and the initial level unlocks a direct tribute to Turing's profound impact as both a computer science pioneer and a June Pride icon.

To drive the core mechanic without adding any friction or registration steps for players, I utilized Google TensorFlow.js loaded straight from a CDN.

Inside app.js

, every frame from the user's webcam is treated as an active mathematical playground. The application converts frame pixels directly into data streams on the browser GPU using tf.browser.fromPixels

. By using localized matrix mathematics with tf.mean()

, it reads the average brightness value instantly. This turns a simple consumer webcam into a zero-latency, private, on-device environmental sensor! It shows off just how incredibly accessible, lightweight, and versatile Google's open-source AI ecosystem can be.

Thank you so much for hosting this jam! Getting to use history, AI, and creative web design to celebrate a beautiful month of milestones was an incredibly rewarding experience. Good luck to everyone participating!

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @tensorflow.js 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-an-on-device…] indexed:0 read:2min 2026-06-21 ·