A simple ai town to demo how easy to integrate adventure game with RPGGO API V2
If you're dreaming of making your own AI-powered town-building game, well, you'll need more than just game dev skills. You'll also have to tackle some seriously brainy AI challenges, like auto-generating storylines, managing memory stacks, handling NPC interactions, and dealing with memory systems—basically, all the techy stuff that turns solo game development into a next-level boss fight!
But now, there's a smarter solution! With the RPGGO API, you can free yourself from the tangled web of AI logic and focus on crafting the game itself. RPGGO will infuse your game with an AI-powered soul, taking care of all the complex AI magic for you!
This demo project tries to show you how the system will work.
if you have any thoughst, feel free to tell me here: Discuss, feedback and bug report
10.13.mp4
gamify-ai-town/
├── public/ # Static files of game assets, like map, npc sprites
├── src/
│ ├── app # Integration code of RPGGO API V2. You can reuse it if you like
│ ├── components # UI and UE implementation in nextjs and phaser3
│ └── config.js # The configuration to bind the game assets to RPGGO game. This is important!
└── package.json # Dependencies and scripts
note If you,
- want to change to another AI game only - go to RPGGO game lobby to pickup the game you like, and change the config.js file to bind.
- want to change the game asset only - use your game asset to overwrite the 'public' folder, and reconfig the config.js file
- want to change the game asset and also another AI game - you need to do both #1 and #2
- want to change the UI and UE - you will need to write the code in src folder.
This graph tells the exact magic about how the system works. Basically, RPGGO covers the end2end pipeline from building a game to rendering a game in real time. As a game developer, all you need to do is very simple:
- find a game you want to make it live in 2D graphic. Either, go to https://creator.rpggo.ai to build your own game if you are a good game designer, or go to https://rpggo.ai game lobby to find a game you like. Remember the game id.
- fill an API Key Application form with the Game ID you chose, or contact them via email at dev@rpggo.ai
- After you get your key, you can use rpggo.js to access the game data and integrate it with your phaser code. This project is also a good example to tell how the integration code will be.
This is a Next.js project bootstrapped with create-next-app
.
-
install latest node.js
-
Clone the GitHub Repository: Begin by cloning the repository using the command:
git clone https://github.com/RPGGO-AI/demo-ai-town.git
-
Install Dependencies: Move into the
demo-ai-town
directory and install the necessary dependencies by running:cd demo-ai-town npm i
-
Add your api key: add it in your .env.local file
NEXT_PUBLIC_AUTH_TOKEN='{$your_api_key}'
-
Run the app
export NODE_OPTIONS=--openssl-legacy-provider
npm run dev # or yarn dev # or pnpm dev # or bun dev
Open http://localhost:3000 with your browser to see the result.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
This project is under MIT license, which means you can do anything you want.
Freedom!
Made with contrib.rocks.
Special thanks to:
I don't have background on phaser3. Without those of references, I cannot make this repo. Thanks!
If you want to make this repo even better, feel free to submit your pr.
If you have any questions, feedback, or would like to get in touch, send me email or message.
There are quite a lot free resources of 2d game asset. You can find the best to match your game. Here is a good recommendation:
- OpenGameArt.org: This website is a highly popular resource library that offers a large collection of free game graphics, audio, and other assets. All resources are free to use, but please review the licensing terms before using each resource. Website: [OpenGameArt.org]. For example, the pirate in the game is coming from here(https://opengameart.org/content/pirate-1)