Inspiration
Temple of Yama
Temple of Yama is an immersive moral-dilemma RPG powered by the Gemini 3 model. Players take on the role of a lost soul in the Hindu afterlife, tasked with aligning their chakras and facing the ultimate judgement by Yama, the Lord of Death.
Gemini 3 Integration
This project utilizes gemini-3-flash-preview for two distinct AI behaviors:
- Chitragupta (The Divine Scribe): Provides poetic, cryptic hints for the Chakra Alignment puzzle based on the player's current progress.
- Lord Yama: Uses advanced reasoning to judge complex moral answers. The AI evaluates the soul's logic and adherence to Dharma, returning a structured JSON verdict with personalized commentary.
The Project Story
Inspiration
The project was inspired by the rich philosophical tapestries of Hindu mythology, specifically the concept of the Pretaloka (the world of spirits) and the court of Yama. In these stories, the journey of the soul isn't just about what you did, but why you did it. Traditional games use binary "good/evil" meters, but I wanted to use Gemini 3's reasoning capabilities to create a "Moral Scale" that understands nuance, intent, and the complexity of human choices.
What I Learned
During development, I discovered the power of Prompt Persona Engineering. By instructing the model to act as Chitragupta (the celestial record-keeper) and Yama, the user experience shifted from "interacting with an AI" to "standing before a deity." I also learned how to effectively handle structured JSON responses from Gemini 3 to drive game state transitions seamlessly without manual parsing hacks.
How I Built It
- Frontend: Built with React 19 for high-performance state management during complex UI transitions.
- Styling: Tailwind CSS was used to craft an "Ancient Temple" aesthetic, utilizing radial gradients, backdrop blurs, and custom CSS mask-images for Yama's imposing silhouette.
- AI Core: Integrated the @google/genai SDK using the
gemini-3-flash-previewmodel, choosing it for its exceptional balance between speed and reasoning depth. - Logic: The game follows a two-phase structure: an ordering puzzle representing spiritual alignment, followed by a free-text reasoning trial representing moral accountability.
Challenges Faced
One of the primary challenges was visual storytelling. Creating a "divine presence" without expensive 3D assets required creative CSS work. I used a "shadow-and-glow" technique where Yama is represented by a silhouette that pulses when the AI is "thinking," making the latency of the API call feel like a thematic part of the experience—the deity weighing your soul. Another challenge was ensuring that the AI remained consistent in its "Dharmic" perspective, requiring iterative prompt refinement to prevent it from becoming too lenient or arbitrarily harsh.
Built With
- and
- api
- gemini
- react
- tailwind-css
- typescript
Log in or sign up for Devpost to join the conversation.