Inspiration Most AI interactions feel like talking to a textbook—polite, helpful, and transparent. We wanted to flip that script. We were inspired by the "Noir" detective genre, where the truth is hidden behind layers of deception. Our goal was to see if Gemini 1.5 Pro could move beyond being an "assistant" and become a "character"—someone capable of holding secrets, maintaining a complex web of lies, and forcing the user to use actual deductive reasoning.

What it does Midnight Manor: The Harrington Case is a multimodal investigative game. Players are dropped into a locked-room mystery where they must:

Interrogate Suspects: Use natural language to question NPCs who have distinct personalities and hidden motives.

Analyze Physical Evidence: Upload images of clues (like a torn guest list or a stained glove). Gemini’s vision capabilities analyze these images to confirm or debunk suspect alibis.

Dynamic Storytelling: No two playthroughs are exactly the same. The AI adapts the narrative flow based on the evidence you discover.

The Accusation: To win, players must submit a logical "Closing Argument" which the AI judges based on the actual facts of the case.

How we built it We utilized the Google AI Studio ecosystem to create a seamless agentic experience:

Gemini 1.5 Flash/Pro: Used for its massive 1M+ token context window, allowing the AI to remember every detail of a long interrogation.

Multimodal API: Integrated image-processing to allow the "Clue Analysis" feature.

TypeScript & React: Built a sleek, noir-themed frontend to house the terminal-style interrogation interface.

System Instructions: Crafted a complex "world-state" prompt that defines the mystery's logic, ensuring the AI doesn't hallucinate "easy" answers.

Challenges we ran into The biggest hurdle was "Prompt Leaking." Initially, if a player asked, "Are you the killer?", the AI was sometimes too honest. we had to refine the System Instructions using "Chain of Thought" reasoning to ensure suspects remained in character and only revealed information when presented with "hard evidence" (clues). Handling the synchronization between the image uploads and the text-based chat history also required careful state management.

Accomplishments that we're proud of We are incredibly proud of the Evidence Logic. Seeing Gemini look at a user-uploaded image of a "broken watch" and then cross-reference that with a suspect’s claim that they were "in the kitchen at 8 PM" felt like magic. We successfully turned a Large Language Model into a functioning "Game Engine."

What we learned We learned that Gemini’s strength isn’t just in generating text, but in contextual reasoning. The ability for the model to "understand" its role as a deceptive NPC was a revelation. We also gained deep experience in multimodal prompt engineering—learning how to tell an AI to "see" a clue through the eyes of a detective.

What's next for Midnight Manor: The Harrington Case The manor is just the beginning. We plan to:

Voice Interrogation: Implement Gemini’s Real-time Multimodal API so players can actually speak to suspects and hear their defensive tones.

Procedural Mysteries: Create a system where Gemini generates a brand-new crime, motive, and clue-set for every new session.

Community Cases: Allow users to "write" their own mysteries for others to solve.

Share this project:

Updates