Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

Building an Multi-characters RPG-Style Game with AIGNE

Robert
Jun 14, 2024 · edited
B
Blogs
cover

Welcome to a detailed walkthrough on how to create a multi-character RPG-style game using AIGNE, an innovative approach I recently showcased at several conferences.

Here is a video tutorial:

This game introduces a new way of engaging with virtual characters by allowing interactions with multiple AI bots within the same setting. Here’s how you can build a similar game.

Overview of the Game Concept#

The game concept is simple yet revolutionary. Unlike traditional visual character games (e.g. those you see from Character.ai ) where interactions are usually with a single character, this game features three different characters: a guard, a maid, and a king. Each character is designed to respond independently to the player, enhancing the complexity and engagement of the game.

image.png

Build in AIGNE step by step#

Step 1: Define Your Characters#

Start by creating detailed profiles for your characters. Decide on their roles, personalities, and how they fit into the game's world. In this demo, each character(guard, maid, and king) has a unique function and backstory. For instance, the guard might be responsible for security questions, the maid could offer quests or information, and the king might make crucial decisions impacting the game’s storyline.

Step 2: Setup the AI Agents#

For this game, you need to build four AI agents: three for the characters and one as a Game Master.

The Game Master’s role is primarily to set up scenes and manage transitions between different game states but doesn't interact with the player directly.

image.png

One of the unique aspects of this development is using multiple languages for prompts and responses. This feature is particularly useful in diverse linguistic settings. For instance, prompts can be written in Chinese, but the characters can respond in the language used by the player, be it English, Japanese, or any other language. This multilingual capability can be achieved by setting the AI to recognize and adapt to the language spoken by the user.

Step 4: Interactive Design#

Each character is integrated into a simple chat layout set against a thematic backdrop—in this case, a palace. This setup not only visually situates players within the game's environment but also makes the interactions more immersive. Players can click on different characters to start conversations, each tailored to the narrative role of the character.

Step 5: Enhancing Game Dynamics#

To add depth to your game, allow characters to interact with each other, share memories, and even keep secrets. This complex interplay can create a more engaging and challenging game environment. You can design scenarios where characters must work together to unlock new game levels or reveal critical plot points.

"Secret sauces" in AIGNE#

There are a few techniques in AIGNE that simplify the process of creating games like that.

Multi-characters in dialog#

The main distinction from typical chat bots or virtual characters is the presence of multiple characters with whom you can engage in conversation.

image.png

To achieve this goal is quite simple, you just need to designate multiple agents as "children" of the Game Master agent:

image.png

Avatar and name of each characters#

AIGNE allows you to create personalized avatars and names for each agent. Simply define a "Profile" output variable and assign the desired value to it.

image.png

Chat background #

The background images evoke the atmosphere of the game and its setting. It is quite simple to achieve this by setting up the background for the chat interface. The background image is also generated using AI.

The setting is located within the "Layout" output variable of the Game Master agent.

image.png

You can build a better one!#

This rudimentary configuration, hastily assembled in under ten minutes for a demonstration, exemplifies the capability of AIGNE to craft refined and captivating games. Subsequent tutorials will delve into the realm of more intricate RPG-style game development, delving into elaborate mapping systems and dynamic character interactions to construct a captivating game universe. Stay tuned for upcoming posts where I will dissect the process of constructing these intricate systems and showcase methods to elevate your game development prowess through the use of AIGNE. I have faith that you can create a superior game based on my tutorials.

2.0.175