LoreKraft: The Future of MMORPGs


Motivation:

What happens when broke grad students, armed with a love for AI and late-night RPG marathons, dream big? You get LoreKraft, an AI-driven MMORPG engine with a twist—AI Dungeon Masters orchestrating vast and dynamic worlds. We were inspired by the idea of replacing the conventional Dungeon Master with an AI expert who could generate epic adventures on the fly. With the rise of Generative AI, transformers, and multi-agent systems, we saw an opportunity to revolutionize RPG gaming into something more immersive, smarter, and more unpredictable—just like the real world of adventuring!

We didn’t just want an RPG; we wanted an engine where multiple AI agents collaborate, much like a council of wise wizards, to create infinite storylines. The idea of multi-agent systems intrigued us—AI as a Dungeon Master that knows the lore, tracks player stats, and even conjures up epic narratives in real-time!


What We Learned:

Berkeley’s hackathon culture taught us one thing: why spend your weekend snacking when you could be hacking? We plunged into the depths of multi-agent systems and learned the true magic of AI-driven collaboration. It’s one thing to have a chatbot, but getting multiple AI agents to work together harmoniously? That’s an entirely different game!

We learned how cutting-edge models like Gemini can be leveraged for creative text generation, while GPT-4 function calls take care of table queries and stats tracking. Beyond the coding, we dove into the intricacies of game mechanics, narrative pacing, and how to maintain an engaging multiplayer experience, all orchestrated through intelligent agents.


How We Built It:

LoreKraft’s foundation lies in a multi-agent system where each agent plays a distinct role in the game’s ecosystem. Here's the technical breakdown:

  • Creative Text Generation: We utilized Gemini AI to generate dynamic, immersive narratives, giving life to the AI Dungeon Master that never gets tired of spinning epic tales.

  • GPT Function Calls: For database queries and knowledge retrieval, we relied on GPT’s function calling capabilities to fetch player stats and interact with the game world seamlessly.

  • Retrieval-Augmented Generation (RAG): We incorporated RAG models to retrieve knowledge from the database, ensuring that player attributes, inventory, and past actions were always at the AI's fingertips.

  • Union of Experts (Agent-Based Collaboration): Each AI agent had a specific task—whether it was map generation, combat event creation, or managing delayed trigger events. These agents operated like a team of expert Dungeon Masters, constantly collaborating to build a robust game engine that responds dynamically to player input.

  • Frontend with Reflex AI: On the frontend, we implemented Reflex AI to create a seamless, interactive interface. The dynamic game board was rendered based on the AI’s decisions in real-time, providing instant feedback to the players.

  • Node.js for Session Management: We utilized Node.js to handle player sessions, allowing for multiplayer interaction and saving the state of each player’s game.

  • Backend with Flask: For the backend, Flask was our framework of choice, ensuring smooth communication between our AI agents and the player interface.

  • Database: We employed a hybrid system—SingleStoreDB for fast retrieval and analytics of game data, and MongoDB to manage dynamic, unstructured data like character traits and lore information.

  • Snap Spectacles for Immersive Experience: To take things up a notch, we tried integrating Snap Spectacles to allow players to experience the game world in augmented reality, where AI could dynamically alter the environment around them, blending the virtual with the real.


Challenges We Faced:

What’s a hackathon without some technical dragons to slay? Here are a few:

  • Multi-Agent Orchestration: Managing multiple AI agents to work in harmony presented synchronization issues. Making sure all agents were on the same page without overwhelming the system took some delicate balancing.

  • Data Optimization: With so much data being passed between AI agents and the database, we faced challenges with optimizing data retrieval and storage. We worked hard to ensure fast queries using hybrid database solutions.

  • Unstable Beta Products: We tried pushing the limits with beta AI tools and platforms, but sometimes they weren’t quite ready for production-level use. While we planned some groundbreaking features, a few had to be scaled back due to instability in beta models.

  • Session Handling at Scale: Handling multiple players while maintaining persistent sessions and ensuring smooth transitions between game states required some significant optimization work on the Node.js side.


Pitch Idea:

For the presentation, we want to generate the entire pitch live using the same AI-driven game engine we've built! Our Dungeon Master AI will craft the narrative of the project as we demo, bringing the technical elements to life through creative storytelling. The agents will work together to present how they built LoreKraft, while seamlessly transitioning between technical explanations, player interactions, and visual frames—giving the judges a real sense of the power of AI collaboration.


Final Thoughts: LoreKraft is more than just a game engine—it's a platform that could revolutionize MMORPGs by utilizing multi-agent systems. Imagine a world where multiple AI agents act like experts, building, managing, and constantly evolving a game world tailored to each player's decisions. This kind of intelligent orchestration can bring depth and immersion to games, unlike anything seen before. We’re not just building a game; we’re building a future where AI and human creativity unite to craft limitless adventures.

Built With

Share this project:

Updates