We hear lots of requests from developers about how to build a AI game website like RPGGO, so we decide to open source a version of our frontend code. Of course this is not the latest version and we removed some functionalities which are not related to personal usage, but still, it is a great code example for those who want to have their own website.
We named this open source project as X-Talk, as to represent AI-driven, interactive, and dynamic conversations. The "X" symbolizes infinite possibilities, cross-domain communication, and next-gen AI dialogue systems, making it a strong fit for an AI-powered game interaction framework.
Check out the tutorial video as below
We reimagined what an AI RPG could be by turning ChatGPT-Next-Web into a dynamic, multi-agent game engine.
Learn how we added support for multiple AI bots, stateful game sessions, and interactive story progression—all in the browser.
📖Read the full technical breakdown → Building a Web-Based Multi-Bot RPG with LLMs: The Frontend Behind RPGGO
You can experience the chat functionality in our official website: www.rpggo.ai, and choose any game to play
If you are interested in the API platform behinds this frontend codebase, you can visit RPGGO Platform: developer.rpggo.ai
4.1 start to clone the repo code to your local dev box
git clone https://github.com/RPGGO-AI/singularity.git
4.2 install Volta, the javascript tool manager
curl https://get.volta.sh | bash
try to use "sudo curl https://get.volta.sh | bash" if not works in ubuntu
4.3 install Node, Yarn
volta install node
volta install yarn
4.4 install all dependencies
yarn install
4.5 get your token
Follow the instruction How to Apply an API Key to get your api key.
4.6 clone a config env. Note you should use environment variables if you try to deploy it in any cloud hosting platform
cp .env.template .env.local
And paste your previous api token to .env.local. But remove the "Bearer"! It should looks like
GAME_API_BEARER_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.J9EIQfKX-3VZh
4.7 run the code in dev
yarn dev
Here you go! You get your site fly. Copy below link to your browser and start from a quick test
http://localhost:3000/game/d6d9cf32-4a4e-404a-9c77-b4f5c75c39cf
Note, you can test more games as long as you have valid game ids. A bunch of games are available in RPGGO game lobby(https://www.rpggo.ai/). You can pick up from there.
This code repository and the model weights are licensed under the MIT License.
We give you the freedom and hope you can make it better and better.
Made with contrib.rocks.
We look forward to the community iteration on this code base. There are some directions worth for exploring:
- UI/UX - how to make the UI/UX configurable
If you have any questions, please raise an issue or contact us at dev@rpggo.ai.