Inspiration

My friends and I love playing tabletop roleplaying games. When I saw this hackathon, I thought it would be so cool to have Amazon's AI lead us through a campaign. I've made some DnD apps before, but nothing that my friends and I could play in person together like this. And nothing using Amazon's toolkit either! I really went from absolutely zero Amazon knowledge to a completely functional game over the course of this hackathon thanks to Q.

What it does

  1. A Unity application runs the show: generating a unique session code.
  2. Players join the game via a web page hosted on AWS Amplify (https://www.dungeonbox.ai)
  3. Amazon Bedrock creates AI-driven scenarios like a DnD Dungeon Master.
  4. Players submit answers and later vote on the best one.
  5. Scores accumulate, and the process repeats until the campaign is finished!

How I built it

  • Unity handles the core game logic, timing, and flow.
  • Amazon Amplify hosts and deploys the web front end where players connect.
  • AWS Lambda functions mediate between the Unity host and the Amazon Bedrock AI agent, passing prompts and returning AI-generated text back to Unity.
  • Q Developer served as an invaluable mentor, teaching me each step of the AWS setup—from configuring Amplify to connecting Lambda functions with Amazon Bedrock.

Challenges I ran into

  • Unfamiliarity with Amazon tools: Initially, I knew absolutely nothing about Amplify, Lambda, or Bedrock. I'd never worked with them and honestly didn't even know what any of them were. I just gave Q Developer my game idea and it showed me how to use and implement these tools!
  • Hosting: Setting up a reliable pipeline for the website on Amplify was tricky since I knew nothing about it. Q really had to guide me through this process.
  • AI–Unity communication: I was expecting to just be able to call some API to get the AI responses. Q led me through the Unity->Lambda->API Gateway flow, including permissions and setup!

What I learned

  • How to deploy a React website on AWS Amplify.
  • Essentials of AWS Lambda for serverless event-driven architecture, including calling external AI endpoints and returning JSON data to Unity.
  • Best practices for Amazon Bedrock usage, from prompt design to interpreting AI responses in a game context.
  • The power of Q Developer as a teaching resource to figure out how to do all of these things!

What's next for DungeonBox.ai

  • Voiceovers: Right now players just read the prompt dialogue/answers to each other. I'd like to have Amazon's AI generate voiceovers to narrate them to the players.
  • Dice Rolls: I'd like to let players roll dice to dictate the efficacy of their submitted actions, like a real DnD game!
  • Migrate off of Firebase: I coded the real-time communication in Firebase because I'm familiar with it and was running out of Hackathon time. I'd like to migrate to an AWS hosted websocket solution!
  • General Quality/Bugfixes: Obviously this was a hackathon project so I prioritized speed. I'd like to hire a designer to really make this game look great. There are plenty of small bugs/issues that pop up here and there and QOL gameplay changes that I'd love to tackle.
Share this project:

Updates