Inspiration
We have always loved Visual Novels, but we hate how static they are. In most games, no matter what you type, the NPC just follows a pre written script. You are reading a book, not having a conversation.
We wanted to create a Survival Visual Novel where the stakes feel real. We imagined a scenario with a hijacked train, a terrified bomber, and a Dead Man's Switch, where the player's exact words matter. If you say the wrong thing, the game should not just give you a Try Again screen. The character should react with genuine fear or aggression.
This inspired Deadline, a game where the antagonist Sarkar is not running on code. He is running on Gemini 3.
What it does
Deadline is a high stakes negotiation simulator. You are trapped on a train moving at 110 km per hour. Across from you is Sarkar, a terrified young man holding a detonator.
Infinite Dialogue You do not pick from A, B, or C options. You type anything you want.
Real Time Persona Sarkar is powered by a custom Gemini system prompt. He knows the train is vibrating. He knows he is scared. He reacts to your tone.
Logic Driven Gameplay The AI does not just chat. It controls the game state. If you use logic, such as mentioning voltage, wiring, or safety, Gemini detects your intent and lowers the threat level, leading to a win state. If you use aggression, such as threats or insults, Gemini detects hostility and detonates the bomb, resulting in game over.
How we built it
We built this project using Ren'Py 8.3, the world's most popular visual novel engine, integrated with Google's Gemini API.
The Engine, Ren'Py We used Ren'Py for the visual presentation, creating custom parallax scrolling effects to simulate the rushing train and shake transforms to mimic the vibration of the bogie.
The Brain, Gemini 3 We chose Gemini 3 because speed is critical in a game loop. We needed the NPC to reply instantly to keep the tension high. We used a carefully designed system prompt to give Sarkar a consistent personality. He is terrified, suspicious, and holding a switch.
The Bridge, Python urllib Ren'Py is built on Python, but it does not support standard external libraries like requests easily. We wrote a custom Python module using urllib and json to capture the player's text input, send it to the Gemini API with the conversation history, parse the JSON response to extract Sarkar's dialogue, and scan the response for hidden trigger keywords such as DETONATE or PASS to change the game scene.
Challenges we ran into
The Frozen Game Loop Initially, calling the API would freeze the entire game window while waiting for a response. We solved this by optimizing the payload and using Gemini 2.5, which is fast enough that the delay feels like the character is thinking.
Ren'Py's Python Limits Ren'Py uses a specific version of Python that makes installing packages like google generative AI difficult for end users. We had to write raw HTTP requests using the standard library to ensure the game works on any Windows or Mac machine without the player needing to install Python separately.
Prompt Engineering Getting the AI to stay in character while also following game rules, such as keeping replies under 25 words, took many iterations. Early versions of Sarkar would give long, helpful speeches instead of acting like a scared bomber.
Accomplishments we are proud of
We are proud that we successfully broke the standard Visual Novel format. Usually, Visual Novels are entirely writing with almost no coding. In Deadline, the writing itself is the code. The fact that we can type “Check the voltage” and the AI understands this as a technical solution, without us ever programming a specific if statement, feels genuinely powerful.
What we learned
API Integration We learned how to manually construct JSON payloads and handle HTTP headers in Python.
Game Design with LLMs We learned that LLMs are not just for generating text. They are effective logic engines that can judge player intent, not just respond to it.
Prompt Stability We learned the importance of strong system instructions to prevent the AI from breaking character or revealing safe solutions too early.
What's next for Deadline
This creates a foundation for a full game with multiple chapters.
Chapter 2 The Bomb Disposal Squad arrives, using Gemini Pro for complex technical instructions.
Voice Synthesis Integrating a text to speech API so Sarkar speaks his AI generated lines in real time.
Log in or sign up for Devpost to join the conversation.