<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AAYUSH BEURA</title>
    <description>The latest articles on DEV Community by AAYUSH BEURA (@aayushbeura04).</description>
    <link>https://dev.to/aayushbeura04</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3302491%2F4ded77b2-c3cc-40ab-8e65-79f38912720f.jpg</url>
      <title>DEV Community: AAYUSH BEURA</title>
      <link>https://dev.to/aayushbeura04</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aayushbeura04"/>
    <language>en</language>
    <item>
      <title>The Campfire Chronicles - How We Created a Dynamic Storytelling Game with Gemini and Murf TTS APIs</title>
      <dc:creator>AAYUSH BEURA</dc:creator>
      <pubDate>Sat, 28 Jun 2025 12:53:29 +0000</pubDate>
      <link>https://dev.to/aayushbeura04/the-campfire-chronicles-how-we-created-dynamic-storytelling-with-gemini-and-murf-tts-apis-2j7n</link>
      <guid>https://dev.to/aayushbeura04/the-campfire-chronicles-how-we-created-dynamic-storytelling-with-gemini-and-murf-tts-apis-2j7n</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://lu.ma/0dzhcc01" rel="noopener noreferrer"&gt;Murf AI Coding Challenge 2&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;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. &lt;strong&gt;As members of team C0xFFEE OverFlow, we (Aayush Beura and Ashmit Mandal)&lt;/strong&gt; are excited to present - &lt;strong&gt;The Campfire Chronicles&lt;/strong&gt;, 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technology Stack
&lt;/h3&gt;

&lt;p&gt;Our project is built on a modern, robust stack designed for performance abd cutting-edge AI integration.&lt;/p&gt;

&lt;h4&gt;
  
  
  Core Development
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Unity 2022.3.54f1 LTS with C# scripting&lt;/li&gt;
&lt;li&gt;TextMeshPro for advanced typography&lt;/li&gt;
&lt;li&gt;Custom VideoPlayer integration for seamless media playback&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  AI Integration
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Google Gemini 2.5 Flash API for story generation&lt;/li&gt;
&lt;li&gt;Murf AI API for high-quality text-to-speech synthesis&lt;/li&gt;
&lt;li&gt;Google Sheets API for secure key management&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Overview of the Project
&lt;/h3&gt;

&lt;p&gt;Below is a summary of the project's architecture, a live demonstration, and the assets created.&lt;/p&gt;

&lt;h4&gt;
  
  
  Flow Chart of Execution
&lt;/h4&gt;

&lt;p&gt;This diagram illustrates the core logic of the game, from initial player input to the final, AI-generated and narrated story chapter.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frufeh1e3yi7zq48fa6ft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frufeh1e3yi7zq48fa6ft.png" alt="An image showing how the game works from beginning to end"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Demonstration
&lt;/h4&gt;

&lt;p&gt;See a complete walkthrough of The Campfire Chronicles in action:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/pCZ3T5rKwTs"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Deployed Website
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://aayushb4.itch.io/the-campfire-chronicles" rel="noopener noreferrer"&gt;https://aayushb4.itch.io/the-campfire-chronicles&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Code Repository
&lt;/h4&gt;

&lt;p&gt;The project is open-sourced and available in two repositories :&lt;/p&gt;

&lt;h4&gt;
  
  
  User End - For Execution/Playing
&lt;/h4&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/AayushBeura" rel="noopener noreferrer"&gt;
        AayushBeura
      &lt;/a&gt; / &lt;a href="https://github.com/AayushBeura/the-campfire-chronicles-user" rel="noopener noreferrer"&gt;
        the-campfire-chronicles-user
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      User-end Repository for the Game - The Campfire Chronicles, includes all files required for playing the game, including the executable
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Campfire Chronicles - Game Executable&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🔥 Welcome to Campfire Chronicles&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Campfire Chronicles&lt;/strong&gt; 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.&lt;/p&gt;
&lt;p&gt;Every playthrough is different - the AI generates a completely unique story based on your character's personality, background, and goals.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🎮 Quick Start&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;System Requirements&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Minimum:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OS&lt;/strong&gt;: Windows 10 64-bit / macOS 10.14+ / Ubuntu 18.04+&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory&lt;/strong&gt;: 4 GB RAM&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graphics&lt;/strong&gt;: DirectX 11 compatible&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage&lt;/strong&gt;: 2 GB available space&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network&lt;/strong&gt;: Internet connection for AI-generated content&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Installation &amp;amp; Launch&lt;/h3&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Download&lt;/strong&gt; the latest release for your platform
or&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;git clone https://github.com/AayushBeura/the-campfire-chronicles-user.git
&lt;span class="pl-c1"&gt;cd&lt;/span&gt; the-campfire-chronicles-user&lt;/pre&gt;

&lt;/div&gt;
&lt;ol start="2"&gt;
&lt;li&gt;
&lt;strong&gt;Extract&lt;/strong&gt; the zip file to your desired location&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run&lt;/strong&gt; &lt;code&gt;The Campfire Chronicles.exe&lt;/code&gt; (Windows) or the app bundle (macOS/Linux)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enjoy&lt;/strong&gt; your personalized storytelling adventure!&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🚀 How to Play&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Getting Started&lt;/h3&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Launch the game&lt;/strong&gt;…&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AayushBeura/the-campfire-chronicles-user" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h4&gt;
  
  
  For Development Purposes
&lt;/h4&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/AayushBeura" rel="noopener noreferrer"&gt;
        AayushBeura
      &lt;/a&gt; / &lt;a href="https://github.com/AayushBeura/the-campfire-chronicles-dev" rel="noopener noreferrer"&gt;
        the-campfire-chronicles-dev
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Development Repository for the Game - The Campfire Chronicles, including all Assets and Scripts required for the game
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Campfire Chronicles - Development Repository&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🔥 Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Campfire Chronicles&lt;/strong&gt; 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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✨ Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI-Powered Story Generation&lt;/strong&gt;: Uses Google's Gemini 2.5 Flash API to create personalized narratives&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Professional Voice Narration&lt;/strong&gt;: High-quality text-to-speech via Murf AI API with synchronized audio&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Character Evolution&lt;/strong&gt;: Visual character progression through chapter transitions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Robust Input System&lt;/strong&gt;: Advanced input handling including Alt+Tab behavior and pause management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless Media Integration&lt;/strong&gt;: Unskippable videos with interactive prompts and smooth transitions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure API Management&lt;/strong&gt;: Dynamic API key fetching via Google Sheets with user override…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AayushBeura/the-campfire-chronicles-dev" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h4&gt;
  
  
  Murf TTS Voice Used
&lt;/h4&gt;

&lt;p&gt;To ensure a consistent and high-quality narrative voice, the following parameters were used for all API Calls :&lt;br&gt;
&lt;code&gt;voice_id = "pt-BR-benício",&lt;br&gt;
  style = "Conversational",&lt;br&gt;
  pitch = -14,&lt;br&gt;
  rate = -14,&lt;br&gt;
  multi_native_locale = "en-US"&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How We Used Murf TTS API
&lt;/h3&gt;

&lt;p&gt;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.&lt;br&gt;
For every &lt;strong&gt;40-word story segment&lt;/strong&gt; generated by the Gemini AI, an API call is made to Murf with our specified voice parameters. The API returns a &lt;strong&gt;base64-encoded MP3 audio file&lt;/strong&gt;. Within Unity, we decode this file in real-time and synchronize the audio playback with a custom typewriter text animation.&lt;/p&gt;

&lt;p&gt;To ensure performance and reliability, we implemented several key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audio Caching&lt;/strong&gt;: Prevents repeated API calls for identical text segments, reducing latency and cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cooldown Timers&lt;/strong&gt;: Manages the API rate limiting to avoid service interruptions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fallback Systems&lt;/strong&gt;: Allows for offline functionality by using pre-packaged audio if the API is unreachable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Case &amp;amp; Impact
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;The impact of this extends beyond our project. &lt;strong&gt;We are demonstrating that small indie teams can now create deeply personalized experiences that were once only feasible for AAA studios with massive budgets.&lt;/strong&gt; 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshot of Game Development Process
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1awsx9iilfhcw1v3572.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk1awsx9iilfhcw1v3572.png" alt="An image showing development in Unity Engine"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshot of Gameplay
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68ck4nyp4vavhj9vbdo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68ck4nyp4vavhj9vbdo3.png" alt="An image showing the execution of the Game"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Credits
&lt;/h3&gt;

&lt;p&gt;Special thanks to my partner, Ashmit Mandal (&lt;a class="mentioned-user" href="https://dev.to/pikadroid"&gt;@pikadroid&lt;/a&gt;), for his dedicated efforts throughout the development and testing process.&lt;br&gt;
We also extend our sincere gratitude to the Murf Team for hosting this competition and providing the powerful tools that made this project possible.&lt;/p&gt;

&lt;p&gt;We are open for any questions or discussions on this project. Thank you !&lt;/p&gt;

</description>
      <category>murfai</category>
      <category>codingchallenge</category>
    </item>
  </channel>
</rss>
