Skip to content

lika94/gamify-ai-town

 
 

Repository files navigation

Gamify AI Town

A simple ai town to demo how easy to integrate adventure game with RPGGO API V2

Screenshot 2024-10-13 141802

📖 Brief

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


🎮 Online demo

10.13.mp4

See the full hd in youtube

Click and Play


📂 File structure

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,

  1. 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.
  2. want to change the game asset only - use your game asset to overwrite the 'public' folder, and reconfig the config.js file
  3. want to change the game asset and also another AI game - you need to do both #1 and #2
  4. want to change the UI and UE - you will need to write the code in src folder.

❓ How it works

373264287-d2e29010-3b02-4bde-878e-fb697645c55e

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:

  1. 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.
  2. fill an API Key Application form with the Game ID you chose, or contact them via email at dev@rpggo.ai
  3. 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.

⚡️ Quick Start in local

This is a Next.js project bootstrapped with create-next-app.

  1. install latest node.js

  2. Clone the GitHub Repository: Begin by cloning the repository using the command:

    git clone https://github.com/RPGGO-AI/demo-ai-town.git
    
  3. Install Dependencies: Move into the demo-ai-town directory and install the necessary dependencies by running:

    cd demo-ai-town
    npm i
    
  4. Add your api key: add it in your .env.local file

    NEXT_PUBLIC_AUTH_TOKEN='{$your_api_key}'
    
  5. 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.


🐳 Production Deployment on Vercel

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.


⚖️ License

This project is under MIT license, which means you can do anything you want.

Freedom!


👨‍💻‍ Contributors

Made with contrib.rocks.


🤝 Acknowledgments

Special thanks to:

I don't have background on phaser3. Without those of references, I cannot make this repo. Thanks!


📬 Contact

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.

👁️Learn More

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)

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.4%
  • CSS 10.3%
  • HTML 2.9%
  • TypeScript 0.4%