DND World Generator

Inspiration

The DND world generator was inspired by the need to streamline and enhance the D&D world-building process. Traditional D&D campaign creation can be time-consuming and complex, requiring DMs to manually craft every aspect of their world. This project aims to leverage multiple AI technologies to assist Dungeon Masters in creating rich, cohesive campaign settings while maintaining creative control.

What it does

The DND world generator is a comprehensive D&D world-building tool that:

  • Generates detailed fantasy worlds with customizable parameters for magic levels, technology, and civilizations
  • Creates interconnected factions, NPCs, and storylines
  • Supports party composition planning with character backstory integration
  • Provides a user-friendly interface with medieval-themed styling
  • Uses multiple AI integrations:
    • Trae for development and rapid iteration
    • Vapi.ai for voice interactions and NPC dialogue
    • Rime.ai for enhanced narrative generation and story branching
  • Allows fine-tuning of world aspects like climate, terrain, and magical phenomena

How we built it

The project is built using a modern web stack:

  • Frontend: React with TypeScript, utilizing shadcn/ui components
  • Styling: Tailwind CSS with custom medieval-themed design
  • Backend: Node.js with Express
  • AI Integrations and tools:
    • Trae with a custom memory bank for rapid iteration
    • Vapi.ai for voice-based interactions and NPC voicing
    • Rime.ai for real and vibey narrative generation
  • Database: PostgreSQL with Drizzle ORM
  • Form Management: React Hook Form for complex form state
  • Authentication: Session-based auth with Passport.js

Challenges we ran into

  1. Complex Form State Management: Handling nested form data for multiple civilizations, factions, and characters
  2. AI Response Processing: Structuring and coordinating multiple AI services (Claude, Vapi.ai, Rime.ai) to work together seamlessly
  3. Ease of iteration: We could not easily retain the context across the development lifecycle so we created a memory bank that maintains all kinds of domain and technical context of the project on Trae so that no info is lost
  4. Voice Integration: Implementing real-time voice interactions with Vapi.ai while maintaining low latency
  5. Narrative Consistency: Ensuring coherent storytelling across different AI services
  6. UI/UX Design: Creating an intuitive interface for complex world-building parameters
  7. Data Persistence: Managing large amounts of generated world data efficiently

Accomplishments that we're proud of

  1. Created a sophisticated world-building system that maintains narrative consistency
  2. Successfully integrated multiple AI services (Claude, Vapi.ai, Rime.ai) for different aspects of world generation
  3. Implemented voice-based NPC interactions using Vapi.ai
  4. Created dynamic narrative branching with Rime.ai
  5. Built a medieval-themed UI that enhances the D&D experience
  6. Developed an intuitive multi-step form process for world creation

What we learned

  1. Advanced React form state management techniques
  2. Multi-AI service integration and orchestration
  3. Voice processing and real-time audio streaming
  4. AI prompt engineering for structured content generation
  5. Complex UI state management for dynamic form fields
  6. Integration of multiple third-party services and APIs
  7. Balancing automation with user creativity in tool design

What's next for the world generator?

  1. Expand the AI generation capabilities with more nuanced voice features
  2. Create voice powered world generation
  3. Add support for custom asset uploads (maps, character art)
  4. Implement real-time collaboration features for DM teams
  5. Create an export system for popular virtual tabletop platforms
  6. Add support for different game systems and settings
  7. Enhance the visualization of generated worlds with interactive maps
  8. Implement a sharing system for community-created worlds

Built With

Share this project:

Updates