Welcome to SpacetimeMUD, a game project developed in using, Rust (server), Typescript (frontend), and Python (ai-agent) that uses SpacetimeDB to create a text based adventure game commonly known as a "Multi-user dungeon". One twist is that players create the dungeon by giving commands to an AI Agent that connects like a player but uses OpenAI to generate the content from user prompts. While this project is still under development, all the code and assets are open-source and free for anyone to use in their own projects.
- Login: The user's private key is stored locally in their home directory the first time they play and is used to authenticate in future sessions.
- Rooms and Navigation: Players can see the room description of the current room and use exit connections to travel form room to room.
- Chat: Players can speak to each other and NPCs using say and tell commands.
- NPCs: NPCs can have conversations with players and are driven by prompts sent to OpenAI API.
- Room and NPC Creation: Players can send messages to the AI Agent asking it to create new rooms and spawn conversational NPCs
- Install SpacetimDB and start SpacetimeDB local instance. View the SpacetimeDB getting started guide for detailed instructions.
- Navigate to the Server folder. Publish the SpacetimeMUD module to your local instance.
spacetime publish spacetimemud
- Navigate to the
react-client
folder and runnpm install
andnpm start
to launch a local client. (Requires Node JS to be installed) - To start the AI Agent, navigate to the
ai-agent-python-client
folder and runpython run.py --openai <INSERT_OPENAI_API_KEY>
TBD