Inspiration
I wanted to create something that combined the strategic depth of D&D with the character-driven storytelling of My Hero Academia. The idea came from asking: "What if you could play a survival RPG where the dungeon master is one of your favorite MHA characters?" Traditional D&D requires a human DM, but with AI, I could give each character their own authentic voice and DMing style—Bakugo as the chaotic, aggressive DM, Iida as the rules lawyer, Aizawa as the lazy-but-effective one. The core concept was to make faction choice matter—being a hero among villains creates genuine tension, and your actions either reinforce or betray your chosen identity.
What it does
DND-MHA is an AI-powered tabletop RPG that drops players onto a mysterious island with four MHA companions. Players create their character, choose a faction (Hero, Villain, or Civilian), select their campaign track, and pick which character becomes their AI dungeon master. The remaining three characters join as companions with unique stats, personalities, and abilities. Grok serves as the dynamic dungeon master, narrating the story in the chosen character's voice while managing dice rolls, companion reactions, and procedurally generating the island environment. Every playthrough is different—Grok scans for resources, determines if NPCs exist, spawns monsters, and creates exploration opportunities. The game focuses on survival, exploration, and the interpersonal drama that arises from forced cooperation between traditional enemies. Faction mechanics add strategic depth: Heroes lead through trust (companions must maintain trust thresholds), Villains rule through fear (companions must stay alive), and Civilians adapt to whoever they're with. Companion stats matter—Bakugo excels at combat and cooking but has poor quirk control, Midoriya is brilliant at problem-solving but risks self-injury, Iida dominates in speed and perception but lacks raw power, and Aizawa brings tactical expertise without the physical prowess of younger heroes.
How I built it
Frontend: React + Tailwind CSS, deployed on Netlify Backend: Node.js + Express on a DigitalOcean VPS (port 3001), managed with PM2 and secured with UFW AI Engine: Grok 4 Fast (grok-4-1-fast-reasoning) via API for dynamic dungeon mastering The architecture uses a single API call per turn that returns structured JSON containing dm_narration, companions_pre (pre-roll reactions), dice_roll, and companions_post (post-roll reactions). I designed characters.js so the selected DM receives a full personality prompt while the other three get companion descriptions.
Development process
The development process involved extensive iteration on game mechanics—I originally designed a coconut-based economy with a shopkeeper NPC (Jace), but scrapped it in favor of letting Grok dynamically generate world elements. This made the game more flexible and reduced context bloat. I also cut the Vigilante faction and villain campaign (Shigaraki, AFO, Toga, Twice as companions) to meet the hackathon deadline and content guidelines, with plans to restore them post-submission. This would ##Challenges I ran into Deployment challenges: Railway and Vercel both failed due to monorepo detection issues and nested path errors. Mixed HTTPS/HTTP content blocking killed several attempts. I finally succeeded with Netlify after correctly configuring the base directory (frontend) and build settings. AI voice fidelity: I tested multiple models before settling on Grok 4 Fast. GPT-4.1 Nano completely failed to capture character personalities. Grok nailed Bakugo's aggression, Iida's formality, and Twice's split personality on the first attempt. The only problem was that Grok continuously struggled to send a properly format json so I may have to send to ANOTHER AI to ensure it is a correct json. Balancing faction mechanics: Making faction choice meaningful without being purely mechanical was tricky. I grounded Villain benefits in MHA psychology (fear-based compliance, physical resilience from harsh training) rather than arbitrary stat bonuses. Content restrictions: University hackathon guidelines meant toning down Bakugo's dialogue and cutting the villain campaign entirely. I had to design around "school-appropriate" constraints while keeping the game interesting. Time crunch: Starting a week late meant aggressive prioritization. I ran multiple AI tools in parallel (Claude for design, Cursor for coding, Grok for testing) and embraced productive procrastination—gravitating to creative work when stuck on technical problems.
Accomplishments that I'm proud of
The AI actually works. Grok doesn't just narrate—it embodies the chosen character's personality consistently across hundreds of dialogue exchanges. Bakugo yells, Aizawa is done with everyone's shit, Iida lectures about protocol violations, and Midoriya overthinks everything. Companion stats that matter. Each character has distinct strengths and weaknesses pulled from canon. Bakugo burns food despite being the best cook when he focuses. Midoriya's poor quirk control creates genuine risk. Iida's speed advantage translates to scouting bonuses. Procedural storytelling. Every playthrough is different because Grok generates the island dynamically. Sometimes there are shops. Sometimes there aren't. Sometimes you find friendly NPCs. Sometimes it's just you and monsters. Faction psychology. The Hero/Villain/Civilian dynamics create genuine roleplay tension. Playing a villain among heroes means constant suspicion. Playing a hero among villains means proving yourself through fear. The forced cooperation mechanic (can't kill the player immediately because survival requires numbers) mirrors the source material's themes. Shipped it. I went from concept to deployed beta in under a week while juggling other work, using cheaper models for routine tasks and reserving capable models for complex reasoning.
What I learned
Grok 4 Fast > GPT-4 for character voice. Model selection matters more than prompt engineering for personality fidelity. Dynamic generation > hardcoded systems. Letting the AI create world elements produces more interesting gameplay than scripting everything up front. Design constraints are real. School-appropriate content guidelines aren't just suggestions—they shape fundamental design decisions. Deployment is half the battle. Railway's monorepo issues, Vercel's path errors, and mixed content blocking taught me that infrastructure problems can kill an otherwise solid build. This also taught me iterative development. I had built each page and viewed them to see if it worked.
Log in or sign up for Devpost to join the conversation.