Gaming
2025 — Present VOID: Legacy
Space Opera Strategy Game with AI Companion & Voice Commands
~27.5K lines across 72 files — a browser-based space opera where a conversational AI companion (PHANTOM-9) powered by Gemini 2.5 Flash interprets voice commands, generates retro-anime visuals via FLUX/Imagen 4, and resolves actions through a D20 dice system. 5 crew members with distinct AI personalities, 6 ship types, shared persistent galaxy, and galactic-scale events.
Year
2025 — Present
Role
Game Designer & Developer
Tech Stack
8 technologies
The Challenge
- Traditional space strategy games lack meaningful AI interaction: players should converse naturally with an AI companion that understands game context, crew moods, threat levels, and evolving storylines
- Visual immersion requires dynamic image generation — every planet arrival, derelict exploration, and combat event needs a unique visual in retro-anime style
- Voice-first command system where the captain speaks orders and the bridge crew responds — requiring STT, intent classification, narrative generation, and TTS in real-time
The Approach
- PHANTOM-9 — "Predictive Heuristic Autonomous Navigation & Tactical Operations Module" — as the ship's AI, powered by Gemini 2.5 Flash with Llama 3.1 8B and GPT-4o-mini fallbacks. Personality: HAL 9000 + Mentat (Dune) + TARS (Interstellar)
- D20 dice resolution: every captain command is classified into 14 intents (explore, attack, negotiate, scan, trade, deceive, flee...) then resolved with a D20 roll modified by ship condition, danger level, and player attitude
- Dual image generation: FLUX.1 Schnell (Workers AI, free, fast) as primary, Gemini Imagen 4 as fallback — 15 narrative scenario templates with distinct visual prompts in Leiji Matsumoto retro-anime style
- Shared persistent galaxy: systems discovered by any player are visible to all — collective exploration with personal notes, ratings, and favorites
The Solution
- Bridge Command System (3,309 lines backend + 2,480 lines UI): voice command → Groq Whisper STT → intent classification (14 types) → D20 resolution → game effects → narrative generation → ElevenLabs TTS with 6 cloned crew voices. 30+ SFX mapped to events
- NarrativeEngine (1,583 lines): Gemini-powered story generation with persistent memory — bridge_log (last 20 entries), visual_script (scene state + active conversation), context_analysis (story summary + character development + tension level), conversation_archive with sentiment analysis
- 5 Crew Members with distinct AI personalities: Comandante Elena "Hielo" Volkov (Martian tactician), Piloto Koji "Relámpago" Tanaka (ace pilot), Ingeniero Viktor "El Mago" Kozlov (gruff mechanic), Médico Marcus "Doc" Chen (compassionate medic) — each with unique Gemini prompts adapting to game state
- Galaxy System (996 lines + 3 map components ~3,500 lines): procedural star systems with economy/danger/security, trade routes, waypoints, journey history, AI-generated system descriptions
- Exploration System (756 lines): derelict room-by-room traversal with hazards (vacuum, radiation, hostiles), loot tiers (common→legendary), oxygen tracking
- Trading & Economy (329 lines + UI): 8 resource types with supply/demand/trend pricing, transport missions, equipment system (9 types: weapons, shields, engines, cloaking)
- "El Protocolo" — Federation inspection system: suspicion level 0-100, three responses (comply/deceive/flee), becoming a fugitive if caught
Key Results
- ~27.5K lines across 72 files — full space opera with AI companion
- PHANTOM-9: Gemini 2.5 Flash + 2 LLM fallbacks, 14 command intents, D20 resolution
- Voice bridge: STT (Groq Whisper) → AI → TTS (ElevenLabs, 6 cloned crew voices)
- Dual image gen: FLUX.1 Schnell + Gemini Imagen 4 with 15 scenario templates
- Shared galaxy: collective discovery, 20+ D1 tables, 9 SQL migrations
- 5 crew + PHANTOM with distinct personalities, persistent conversation memory
Tech Stack
Astro 4.x React Islands Zustand D1 Gemini 2.5 Flash FLUX ElevenLabs Groq Whisper
$ cat project.json
{
"name": "VOID: Legacy",
"status": "production",
"stack": [8],
"url": "void.cadences.app",
"results": [6]
}