Inspiration
The spark for Trace of Ink came from the fluid, unpredictable nature of Ebru (Turkish water marbling). I wanted to capture that "drop of ink in water" feeling—where a single decision creates a beautiful, permanent pattern that can never be undone.
Also, I was deeply moved by the line from the film Mr. Nobody: "As long as you don't choose, everything remains possible." My goal was to build a system where those infinite possibilities never truly disappear.
What it does
Trace of Ink is a generative storytelling engine that turns readers into co-directors. It orchestrates multiple AI agents to create a persistent narrative world based on users character and world choices:
The Multiverse Tree: Every choice is saved in a non-destructive "Story Tree." You can jump back to any previous node and start a new timeline without losing your old ones.
Speculative Rendering: To keep the experience fast, the system "guesses" your next move and pre-generates the text in the background.
NPC Discovery: As you read, the system automatically detects new characters, generates their 64x64 portraits, and adds them to a living relationship map.
Tactile UI: Everything lives inside a 3D-style two-page spread, blending classic fairy-tale aesthetics with high-tech AI orchestration.
How we built it
The AI Brain Story Generation: Gemini 3 Flash via LangChain Image Generation: Imagen 3 Agentic Framework: LangChain to coordinate specialized agents (Story, Art, Game) in parallel.
The Frontend (Narrative UI) Next.js 14 (React 18 + TypeScript)
The Backend FastAPI & Uvicorn: Python Infrastructure: Docker
Challenges we ran into
The biggest hurdle was the "Writing..." wall. Waiting for AI to generate content kills the magic. I had to decouple the assets: the text (the "skeleton") loads instantly, while the images (the "skin") lazy-load behind a "Hero Running" animation.
Moving from a destructive state to a non-destructive multiverse was also a challenge. I had to re-engineer the backend to treat the story as a Directed Acyclic Graph (DAG), ensuring that switching between a path you took yesterday and a new one today feels instantaneous.
Accomplishments that we're proud of
Zero-Latency Navigation: Creating a system where you can traverse a complex story tree with fast text transitions.
Proactive NPC Discovery: I’m proud of the "Watcher" logic that identifies new characters in the text and auto-populates the relationship map without manual input.
Visual Consistency: Seeing the engine generate a story that is genuinely surprising—even to the person who wrote the code—while keeping the art style consistent.
What we learned
What's next for Trace of Ink
The journey of Trace of Ink is expanding from a story engine into a living narrative ecosystem. Here is what we are building next:
Dynamic Character Attributes: We are introducing a narrative RPG layer. Characters will now have evolving traits like Brave Level and Health. Your choices will directly shift these stats: a reckless decision might drop your health to zero, leading to a permanent death in that timeline, while building your bravery to 50 might be the only way to defeat a dragon later in the story. Every selection creates a ripple effect that dictates your future survival.
Collaborative Multiverses: Storytelling will become a social experience. You will be able to share your unique story branches with friends, and they can share theirs with you. Most excitingly, we are building a feature to combine stories. You and a friend can merge your individual timelines to create a new, shared branch where you both make decisions together, seeing how your different worlds collide.
3D Blueprint Exporting: We want to bring your journey into the physical world. We are developing a system to export 3D blueprints of the unique characters you discover. This will allow users to 3D print their specific heroes and NPCs, turning a digital "trace of ink" into a tangible keepsake.
The Judge Agent: To ensure the highest quality of storytelling, we are implementing a Judge Agent. This specialized AI will act as the ultimate director, working behind the scenes to maintain strict narrative consistency across thousands of branches. It will also serve as a safety layer, ensuring that the language and themes remain perfectly appropriate for the age level selected by the user.
Log in or sign up for Devpost to join the conversation.