DEV Community

Cover image for My Turing Solstice Project: A Narrative Puzzle Game Powered by Gemini AI
Rajab Baig
Rajab Baig

Posted on

My Turing Solstice Project: A Narrative Puzzle Game Powered by Gemini AI

June Solstice Game Jam Submission

This is a submission for the June Solstice Game Jam

Video Demo


Code

GitHub logo rajab-rajab / June-Solstice-Game-Jam

We are celebrating authenticity and LGBTQIA+ history with Pride month, which also happens to be the birth month of Alan Turing – the famous computer scientist behind the "Turing Test" for artificial intelligence who was persecuted for being gay. June also marks Juneteenth, a day to celebrate an important milestone towards the freedom.

The Turing Solstice

A narrative logic puzzle game for the June Solstice Game Jam

"Every code can be broken. Every wall can fall. Every self can be free." — The Machine, at Solstice


🎯 Concept

You are an apprentice to Alan Turing. The Solstice is a cosmic event where the barrier between human intelligence and artificial intelligence is thinnest.

The screen is split in two:

☀️ LIGHT PANEL (Day) 🌙 DARK PANEL (Night)
Solve logic gate puzzles Commune with The Machine
Visual, click-based Text terminal, type to speak
AND · OR · NOT gates Gemini AI responds in character

The Machine's personality changes based on your Solstice Energy (Sunlight meter) — from COLD and cryptic to RADIANT and celebratory. On the actual solstice (June 21), the game unlocks special content.


🏆 Why This Wins

Best Google AI Usage

Gemini is mechanically essential — not a chatbot add-on:

  • Generates puzzles

How I Built It

By creating this project The Turing Solstice was a milestone in the way of historical tribute and modern artificial intelligence. I chose Python and Pygame for its flexibility and usefulness. Python, pygame and gemini model are the core engine because using them I create a "retro-technical" aesthetic that mimics the computing world of the 1950s.

  1. The Dual-Core Gameplay Engine The most interesting technical challenge was the split-screen architecture. The game runs two separate systems simultaneously: The Light Panel: A custom-built logic gate simulator. I built a modular "Gate Class" that evaluates inputs (AND, OR, NOT) in real-time. The Dark Panel: A retro terminal emulator. I built a typewriter-style text renderer that controls "The Machine's" responses, complete with scanlines and a phosphor glow effect.
  2. Making AI "Mechanically Essential" (Gemini 3.1 Flash Light) For the Best Google AI Usage category, I didn't want a generic chatbot. Instead, I integrated Gemini 3.1 Flash light directly into the game’s state machine. The Personality Shift: I used a dynamic prompting system. Gemini is fed the current sunlight_meter value. If the meter is low (Darkness), Gemini uses a "Cold/Cryptic" system prompt. As the player solves logic puzzles and increases "Sunlight," the system prompt updates in real-time to "Warm" or "Radiant," changing the machine's tone and willingness to help. Procedural Puzzles: Gemini generates unique cipher challenges (ROT13, A1Z26, etc.) on the fly, ensuring that no two playthroughs are exactly the same.
  3. Real-World Time Integration To honor the June Solstice, I used Python's datetime module to check the local system clock. If the game is launched on June 21st, the UI colors shift into a "Convergence" palette, and the AI acknowledges the specific astronomical transition, bridging the gap between the player's reality and the game world.
  4. Weaving the Narrative The progression system is tied to "Found Documents." These aren't just lore; they are milestones of history. I curated specific fragments related to: Alan Turing’s 1952 persecution to highlight the theme of authenticity. General Order No. 3 (Juneteenth) to parallel the theme of "delayed liberation." The Stonewall Uprising to tie the struggle for identity back to June’s Pride Month.

Prize Category

I am officially submitting The Turing Solstice for the following two categories:

  1. Google AI Usage In this project, "gemini-3.1-flash-lite" is not just a mere addition—it works as a functional game engine, brain of project. State-Aware AI: The AI is integrated into the game's logic. By feeding the current sunlight meter value into the system prompt, the AI’s personality shifts dynamically, as the player progresses. Procedural Content: Gemini generates unique ciphers and narrative clues on the fly, ensuring that the "Dark Panel" terminal feels alive and unpredictable. Intelligent Evaluation: The AI evaluates the player’s narrative responses, granting "Sunlight Energy" based on the creativity and relevance of their answers, rather than just checking for static keywords.
  2. Best Ode to Alan Turing This game is a tribute to the "father of modern computing" on multiple levels: Scientific Tribute: The core gameplay loop—solving logic gates and ciphers—is a direct mechanical representation of Turing’s work at Bletchley Park and his innovative development on the ACE (Automatic Computing Engine). Historical Narrative: As players solve puzzles, they unlock "Found Documents" that explore Turing’s 1950 paper on machine intelligence and the tragic history of his persecution. Intersectional Recognition: By launching during the June Solstice and Pride month, the game honors Turing’s legacy as a scientist, a metaphor for the struggle for authenticity and freedom. If API KEY FAILS PROGRAM WOULD RUN ON ITS OWN.

Top comments (0)