An Unwritten Diary: An AI-Powered Interactive Story Game inspired by the Oregon Trail
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
I built An Unwritten Diary, an interactive historical survival narrative game inspired by my recent reading of the Diary of Anne Frank.
The player takes the role of a mother trying to protect their family while navigating life under Nazi occupation in the Netherlands. Throughout the game, players make difficult decisions that influence their family's relationships, resources, and circumstances.
I interpreted the theme as exploring how technology can help tell stories about the past. The incorporation of AI helps make the fictional characters and their experiences feel more personal and responsive.
Demo
Code
How I Built It
I am quite a greenhorn to all of this, being a college student who has only recently tried my hand at properly learning computer science. This is my first ever hackathon, and more than anything else, I wanted to learn from this. I built the frontend using TypeScript and Vite, with my past experience on this being only a tiny dabble into TypeScript. I used Express.js for the backend, handling communication with Google's Gemini API. It was honestly a shock to me how relatively easy everything was to pick up, thanks to it all being open-source with plenty of documentation. I had, before this month, barely even known what a backend or API was.
Some of the main technologies I used include:
- TypeScript
- Vite
- Express.js
- Google Gemini API (
gemini-3.5-flash-lite) - Google Gemma API (gemma-4-26b-a4b-it)
- Git and GitHub
- Vercel and Render for deployment
This was a particularly valuable project for me in learning the basics of how frontend and backend systems communicate, how to integrate an AI API, and how to deploy a full-stack application.
Why Does Open Innovation Matter?
Open innovation matters because projects like this benefit from being built on tools and technologies that developers can access, learn from, and contribute to. I myself looked at other people's dev posts to try to gain inspiration while making the project. I can't seem to find how to view the past week's entries, but I remember one submission about a program made to help a friend with diabetes prevent late-night spikes without invading his privacy. It amazed me how creative and amazing everyone's projects were, and I hoped to add something of my own, no matter how much it may pale in comparison.
I also found it really nice how easy an open-source project was to share. GitHub was, as always, great to share my code, but Render was also really easy to pick up and use. I even exclaimed to my little brother how quickly I got it working.
The Spirit of It
Personally, as already described, this project was a learning experience for me. But for the game, I had a vision in mind for what it was to represent and what emotion or feeling I hoped for it to instill. History is often taught through dates, statistics, and major events. Those are important, but they can sometimes make it difficult to appreciate the uncertainty and personal decisions ordinary families faced. I found that both playing The Oregon Trail and reading the Diary of Anne Frank made me empathize with the individual experience, beyond statistics or raw numbers. Thus, with the hackathon ongoing, I felt motivated to design a game that fused the two.
I wanted to imitate The Oregon Trail's text-based storytelling and pre-designed options, but add a twist where the player can add their own custom input to influence the story. There will be a baseline result that the AI adds onto based on the player's input, and if the player chooses without entering additional details, the game uses the baseline result. I also implemented response validation to help ensure that AI-generated content follows the game's expected structure and respects the game's mechanics.
By putting the player in the position of a fictional parent, I hoped to make those difficult circumstances more understandable on a personal level. Whether or not I did that well is up to you to decide.
Prize Categories
Best Use of Gemma: I integrated Google's Gemma open-weight model as an alternative to Gemini in the game's narrative generation system. Players can choose between the two models when adding custom details to their decisions, allowing Gemma to generate personalized narrative responses. At the same time, the game validates the resulting content and stat adjustments. This is slightly subjective, but I felt like Gemma gave better responses, though noticeably slower.