Project Info
This project did not submit a demo video on Devpost.
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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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.
LoreKraft: The Future of MMORPGs
An AI-driven MMORPG engine with AI Dungeon Masters creating endless adventures.
Motivation
What happens when broke grad students, fueled by a passion for AI and late-night RPG marathons, dream big? You get LoreKraft—an AI-powered MMORPG engine where AI Dungeon Masters collaborate to generate dynamic and engaging worlds in real-time. With Generative AI, multi-agent systems, and our love for gaming, we set out to revolutionize RPGs into something more immersive, unpredictable, and intelligent.
What We Learned
In Berkeley’s hackathon culture, we learned why we’d rather spend our weekends hacking than snacking! We dove into multi-agent systems, understanding how to create harmony among AI agents and push the limits of AI collaboration. Our efforts in combining creative text generation, efficient data handling, and game mechanics led us to a groundbreaking RPG experience powered by multi-agent AI.
How We Built It
LoreKraft is built on a foundation of multi-agent collaboration where each agent has a specific role in the game’s ecosystem. Here’s a technical breakdown:
-
Creative Text Generation
Using Gemini AI, we generated immersive narratives to keep players engaged. Our AI Dungeon Master spun tales without tiring, adding endless creative twists to the gameplay. -
GPT Function Calls for Database Management
With GPT-4’s function calling, we handled database queries and knowledge retrieval, tracking player stats and game dynamics seamlessly. -
Retrieval-Augmented Generation (RAG)
We used RAG models to retrieve knowledge from our databases, ensuring that player attributes, inventory, and history were instantly accessible to AI agents.
-
Union of Experts (Agent-Based Collaboration)
Each agent specialized in a task—whether map generation, combat events, or managing delayed events. Together, they collaborated like a council of Dungeon Masters, enhancing player experience. -
Frontend with Reflex AI
We leveraged Reflex AI for a dynamic, interactive interface, allowing players to see the AI’s decisions reflected on the game board in real-time. -
Node.js for Session Management
With Node.js, we maintained player sessions, supporting multiplayer interactions and state persistence. -
Backend with Flask
Flask facilitated smooth communication between AI agents and the frontend, ensuring fast and reliable performance. -
Database Management
A hybrid approach with SingleStoreDB for quick retrieval and MongoDB for handling unstructured data like character traits. -
Augmented Reality with Snap Spectacles
For immersive gameplay, we integrated Snap Spectacles to bring the game world to life, blending virtual and real environments.
Challenges We Faced
-
Multi-Agent Orchestration
Synchronizing multiple agents was a challenge, ensuring consistent responses without overwhelming the system. -
Data Optimization
Efficient data handling between agents and databases was essential, prompting us to optimize retrieval and storage using hybrid databases. -
Beta Instability
Working with cutting-edge AI tools in beta stages sometimes introduced instability, requiring us to adapt our approach for reliability. -
Session Handling at Scale
Ensuring smooth transitions between game states and persistent sessions for multiple players was complex but rewarding.
Implementation
Final Thoughts
LoreKraft isn’t just a game engine; it’s a revolutionary approach to MMORPGs. Using multi-agent systems, we’re creating a world where multiple AI agents collaborate to build, manage, and evolve a game world based on player decisions. This kind of intelligent orchestration can offer unparalleled immersion and adaptability, crafting unique adventures for every player.
Built With
- fetchai
- flask
- gemini
- gpt
- hume
- javascript
- python
- reflex
- ripple
- singlestore
- snapchat
- vapi
Acknowledgments
Special thanks to the Berkeley Hackathon team and our mentors for their guidance and support throughout this project.
Ready to experience the next level of MMORPGs? Join us in the adventure with LoreKraft!
Analysis
View
Metric
- 8
- 5
- 3
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- FlaskClaimed
- Google GeminiClaimed
4 of 6 appear in the indexed code. 2 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
76 KB
Source files
15
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
plasya/LoreKraft
35 files · 23.7 MB · @ 768292c
Structure
Interface
3 files · 9%Screens, components and styles rendered to the user.
Application logic
9 files · 26%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python52%
- HTML29%
- CSS11%
- Markdown6%
- JavaScript2%
Share of indexed source by file size. Binary and vendored files are excluded.
Feature verification
AI Dungeon Master narrative generation (GPT-4 Assistants)Verified
An AI Dungeon Master built with GPT-4 generates dynamic narrative, next moves, image prompts, and manages player turns
Claimed on readmehigh confidencegame-engine/dungeon_master.py:83— Creates an OpenAI Assistant named 'Dungeon Master' on gpt-4o with detailed narrative/next-node/image-prompt/player-turn instructionsgame-engine/dungeon_master.py:153— get_dungeon_master_response creates a thread, runs the assistant, and returns its message content
Flask backendVerified
Flask is the backend framework ensuring communication between AI agents and the player interface
Claimed on readmehigh confidenceapp.py:22— Flask app is instantiated and defines all HTTP routes (login, game, guild, map creation, image gen)
GPT function calling for player stats / character database queriesVerified
GPT-4 function calls fetch player stats and interact with the game world via the database
Claimed on Devposthigh confidencegame-engine/validation_assistant.py:83— Assistant is created with a 'get_character_info' function toolgame-engine/validation_assistant.py:135— Tool call arguments are parsed and get_character_info queries MongoDB, then results are submitted back via submit_tool_outputs_and_poll
MongoDB for character/lore/unstructured dataVerified
MongoDB manages dynamic, unstructured data like character traits and lore information
Claimed on readmehigh confidenceapp.py:24— Flask app configured with MONGO_URI and PyMongo, /test route queries mongo.db.charactersgame-engine/dungeon_master.py:39— MongoClient connects to 'Hackathon' database and queries 'players'/'characters' collections
Procedural map generation with events (common/friendly/delayed/trigger)Verified
Map generation agent creates game maps and manages combat/event/delayed-trigger events
Claimed on readmehigh confidencelibs/MapStruct.py:51— Map class builds a node graph from input dict and assigns common/delayed/trigger/friendly events randomly to nodesapp.py:105— /create_new_map route uses generate_random_numbers and Map to build a new map from posted datagame-engine/map_gen_assistant.py:15— generate_dnd_map uses GPT-4o to procedurally generate a themed map dictionary with start/end points
User login/authenticationVerified
Players sign in to access the game (login page, sessions)
Claimed on readmehigh confidenceapp.py:28— Hardcoded users dict checked in /login route; sets Flask session on successtemplates/login.html:1— Login form template with username/password fields exists
Guild creation/joining systemCode-supported
Multiplayer interaction via guild creation/joining supporting session-based game state
Claimed on readmemedium confidenceapp.py:76— /guild_create_joinpage route lets a user create or join a guild by code, storing guild code in the Flask session and an in-memory 'guilds' dict (not persistent, no real multiplayer sync)
Image generation for narrative moments (DALL-E)Code-supported
Image Prompt: generate 3 image frames representing key narrative moments
Claimed on readmemedium confidencegame-engine/image_gen.py:8— image_gen(prompt) calls OpenAI's dall-e-3 model to generate and save a single image; only produces one image per call, not the '3 frames' described, and endpoint wiring in app.py has a bug (function name collision)app.py:93— /imagen route calls imag_gen(p) but a local variable named imag_gen shadows the imported route function, so this code would raise a runtime error, indicating the feature is not actually working end-to-end
Multi-agent collaboration (map generation, validation, dungeon master as separate agents)Code-supported
Union of Experts: distinct AI agents for map generation, combat/events, validation, etc., collaborating like a council of Dungeon Masters
Claimed on readmemedium confidencegame-engine/map_gen_assistant.py:15— Separate GPT-4o call (generate_dnd_map) dedicated to procedural map/story generationgame-engine/validation_assistant.py:41— Separate 'Validation Assistant' agent for validating player actionsgame-engine/dungeon_master.py:157— dungeon_master.py calls get_validation_response, showing some cross-agent invocation, though orchestration is a simple sequential call rather than a coordinated multi-agent system
Retrieval-Augmented Generation (RAG) from database for player/lore dataCode-supported
RAG models retrieve player attributes, inventory, and history from the database for the AI agents
Claimed on readmelow confidencegame-engine/dungeon_master.py:58— Queries MongoDB characters collection and injects enemy_characters data directly into the assistant's system prompt, i.e. simple context stuffing/prompt injection of DB data rather than an actual retrieval/embedding-based RAG pipeline
fetch.ai / Hume / Vapi / Ripple integrationsClaimed only
Built With list includes fetchai, hume, ripple, vapi
Claimed on Devposthigh confidenceGemini AI for creative text generationClaimed only
Gemini AI is used to generate dynamic, immersive narratives for the AI Dungeon Master
Claimed on readmehigh confidenceNode.js session management for multiplayerClaimed only
Node.js handles player sessions, multiplayer interaction, and saving game state
Claimed on readmehigh confidenceReflex AI frontend for dynamic game boardClaimed only
Frontend built with Reflex AI, rendering the dynamic game board based on AI decisions in real-time
Claimed on readmehigh confidenceSingleStoreDB for fast retrieval/analyticsClaimed only
Hybrid database system uses SingleStoreDB for fast retrieval and analytics of game data
Claimed on readmehigh confidenceSnap Spectacles AR integrationClaimed only
Snap Spectacles integrated to let players experience the game world in augmented reality
Claimed on readmehigh confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.