Dungeons and Llamas is a serverless Discord bot written in Rust, leveraging AWS services such as API Gateway, DynamoDB, Lambda, Bedrock, and more! This bot creates dynamic, text-based adventures powered by LLMs, allowing users to experience unique, AI-generated stories each time they play.
The bot uses Discord's API as a UI, offering players a variety of commands throughout their adventure.
- Dynamic Story Generation: AI creates content based on player inputs.
- Discord Command Integration: Players can interact with the game using Discord commands.
To start a new game, the user will use the /new-game
command, where they will fill in some basic details about their character.
Players can specify a theme for their game, and the AI will generate content related to that theme.
If a player wants to adjust the settings of their campaign, they can use the /settings
command.
Once the game starts, players will choose from three different weapons to begin their adventure.
The bot currently supports three different scenarios:
- Battle
- Shop
- Rest
To add the Dungeons-and-Llamas bot to your Discord, follow this link.
Here are the available commands for now:
-
/new-game
: Creates a new game and writes all player records to DynamoDB. Example record:{ "UserId": { "S": "623440987023810570" }, "StateComponent": { "S": "sXDwyrS6M8O#Game#Player#Inventory#Item#Armor#Equipped#Shield" }, "State": { "NULL": true } }
- Created Discord bot Lambda
- Created command manager Lambda
- Developed the Dungeons and Llamas API (to handle interactions with game logic)
- Set up DynamoDB data modeling for player inventory
- Integrated bot → API → database
- Build out further data models for GAME, ENEMY, ROUNDS, LEVELS, NPC
- Add additional records for GAME, ENEMY, ROUNDS, LEVELS, NPC components to DynamoDB on
/new-game
- Integrate with Bedrock
- Begin releasing to production
- Turn serverless Discord bot infrastructure into a Terraform module
To set up the project environment:
doppler setup -p {project_name} -c {config_name}
just apply <module>
: Apply "module"just build-lambdas
: Build Lambdasjust deploy-lambdas
: Deploy Lambdas