This is a submission for the Murf AI Coding Challenge 2
The gaming industry is experiencing a revolution with AI integration, and I recently completed a project that showcases the incredible potential of combining multiple AI services for dynamic storytelling. As members of team C0xFFEE OverFlow, we (Aayush Beura and Ashmit Mandal) are excited to present - The Campfire Chronicles, a project born from passion for both gaming and artificial intelligence. This fully-functional Unity game explores the incredible potential of combining multiple AI services to revolutionize dynamic storytelling. We believe this project serves as a creative and innovative achievement, showcasing how AI can create truly personalized experiences in the booming gaming industry.
Technology Stack
Our project is built on a modern, robust stack designed for performance abd cutting-edge AI integration.
Core Development
- Unity 2022.3.54f1 LTS with C# scripting
- TextMeshPro for advanced typography
- Custom VideoPlayer integration for seamless media playback
AI Integration
- Google Gemini 2.5 Flash API for story generation
- Murf AI API for high-quality text-to-speech synthesis
- Google Sheets API for secure key management
Overview of the Project
Below is a summary of the project's architecture, a live demonstration, and the assets created.
Flow Chart of Execution
This diagram illustrates the core logic of the game, from initial player input to the final, AI-generated and narrated story chapter.
Demonstration
See a complete walkthrough of The Campfire Chronicles in action:
Deployed Website
https://aayushb4.itch.io/the-campfire-chronicles
Code Repository
The project is open-sourced and available in two repositories :
User End - For Execution/Playing
AayushBeura
/
the-campfire-chronicles-user
User-end Repository for the Game - The Campfire Chronicles, includes all files required for playing the game, including the executable
Campfire Chronicles - Game Executable
🔥 Welcome to Campfire Chronicles
Campfire Chronicles is an AI-powered narrative adventure where your choices shape a unique story experience. Create your character and embark on a personalized 5-chapter journey with professional voice narration and stunning visuals.
Every playthrough is different - the AI generates a completely unique story based on your character's personality, background, and goals.
🎮 Quick Start
System Requirements
Minimum:
- OS: Windows 10 64-bit / macOS 10.14+ / Ubuntu 18.04+
- Memory: 4 GB RAM
- Graphics: DirectX 11 compatible
- Storage: 2 GB available space
- Network: Internet connection for AI-generated content
Installation & Launch
- Download the latest release for your platform or
git clone https://github.com/AayushBeura/the-campfire-chronicles-user.git
cd the-campfire-chronicles-user
- Extract the zip file to your desired location
-
Run
The Campfire Chronicles.exe
(Windows) or the app bundle (macOS/Linux) - Enjoy your personalized storytelling adventure!
🚀 How to Play
Getting Started
- Launch the game…
For Development Purposes
AayushBeura
/
the-campfire-chronicles-dev
Development Repository for the Game - The Campfire Chronicles, including all Assets and Scripts required for the game
Campfire Chronicles - Development Repository
🔥 Overview
Campfire Chronicles is an innovative narrative-driven game that leverages advanced AI technologies to deliver personalized storytelling experiences. Players create unique characters whose choices influence a dynamically generated 5-chapter story, complete with synchronized voice narration and immersive visuals.
Unlike traditional games with predetermined narratives, Campfire Chronicles generates unique stories for each player based on their character creation choices, creating infinite replayability and truly personalized gaming experiences.
✨ Features
- AI-Powered Story Generation: Uses Google's Gemini 2.5 Flash API to create personalized narratives
- Professional Voice Narration: High-quality text-to-speech via Murf AI API with synchronized audio
- Dynamic Character Evolution: Visual character progression through chapter transitions
- Robust Input System: Advanced input handling including Alt+Tab behavior and pause management
- Seamless Media Integration: Unskippable videos with interactive prompts and smooth transitions
- Secure API Management: Dynamic API key fetching via Google Sheets with user override…
Murf TTS Voice Used
To ensure a consistent and high-quality narrative voice, the following parameters were used for all API Calls :
voice_id = "pt-BR-benício",
style = "Conversational",
pitch = -14,
rate = -14,
multi_native_locale = "en-US"
How We Used Murf TTS API
Our integration of Murf's Text-to-Speech API was crucial for bringing our dynamic stories to life with professional-quality narration. The process is engineered for efficiency and a seamless player experience.
For every 40-word story segment generated by the Gemini AI, an API call is made to Murf with our specified voice parameters. The API returns a base64-encoded MP3 audio file. Within Unity, we decode this file in real-time and synchronize the audio playback with a custom typewriter text animation.
To ensure performance and reliability, we implemented several key features:
- Audio Caching: Prevents repeated API calls for identical text segments, reducing latency and cost.
- Cooldown Timers: Manages the API rate limiting to avoid service interruptions.
- Fallback Systems: Allows for offline functionality by using pre-packaged audio if the API is unreachable.
This robust integration allows for a dynamic, 5-chapter narrative where the voiceover adapts to each player's unique story while maintaining consistent audio quality.
Use Case & Impact
We began this project to address a fundamental limitation in story-driven games: every player experiences the same, static narrative. While enjoyable, these games lack deep personalization. Who doesn't love to play games? And it's even better when you can relate the story to your own life.
Our AI-powered approach flips this model entirely. When a player designs a character—for instance, a brave, scholarly hero with a mysterious past—the AI actively uses those traits to generate the plot. A brave character faces challenges that test their courage, while a scholar's journey unfolds through puzzles and lore. The story is no longer pre-determined; it is generated in response to the player's identity.
The impact of this extends beyond our project. We are demonstrating that small indie teams can now create deeply personalized experiences that were once only feasible for AAA studios with massive budgets. This work serves as a proof-of-concept that AI integration can democratize game development and empower creators to build more engaging and replayable worlds.
Screenshot of Game Development Process
Screenshot of Gameplay
Credits
Special thanks to my partner, Ashmit Mandal (@pikadroid), for his dedicated efforts throughout the development and testing process.
We also extend our sincere gratitude to the Murf Team for hosting this competition and providing the powerful tools that made this project possible.
We are open for any questions or discussions on this project. Thank you !
Top comments (0)