Dialogue Dreamland is a Unity project that uses ChatGPT to give NPCs unique personalities in a WebGL build designed for browser use.
- 🚀 Introduction
- 🎥 Showcase
- 💾 Installation
- 📅 Upcoming Features
- 💡 Future Ideas
- 🤝 Contribution Guidelines
- 🏅 Credits
- 📝 License
Welcome to Dialogue Dreamland, an immersive and innovative Unity project that harnesses the power of OpenAI's ChatGPT to breathe life into non-player characters (NPCs) in a WebGL build accessible right from your browser. By integrating state-of-the-art natural language processing technology, this project delivers engaging, interactive dialogues and unique NPC personalities, creating a dynamic and captivating gaming experience unlike any other. Dive into the world of Dialogue Dreamland and witness the fusion of artificial intelligence and game development come alive.
This section highlights some of the key technical features and design choices that make Dialogue Dreamland a unique and engaging project.
Dialogue Dreamland uses ChatGPT to generate responses to player input. ChatGPT is a state-of-the-art natural language processing model that uses deep learning to generate human-like responses to text prompts.
WebGL is a platform that allows you to create interactive 3D content for the web. The project uses WebGL to create a browser-based game that can be played right from your browser.
This project makes use of game-ci, a GitHub Action that allows you to build your Unity project. The project is automatically built and deployed to GitHub Pages on every push to the main
branch. See github/workflows/main.yml for more details.
The project uses Unity's JavaScript Interop to handle UI issues with emojis, as it is much easier to handle emojis in HTML than with Unity. There is a UI built into the project that can be used to test in Editor (without the HTML UI), it is not used in the WebGL build.
Dialogue Dreamland features AI-generated background music created by Soundraw.
- Cinemachine to manage the camera.
- Unity Addressables to load assets at runtime.
- Unity Input System to handle input.
- Unity TextMeshPro to render text.
- UI Toolkit to create the UI.
This project includes a submodule, ChatGPTWrapper, a fork of ChatGPT-Wrapper-For-Unity - which is a wrapper for the ChatGPT API that allows you to use it in Unity.
- Unity version 2021.3.20f1 or higher 🎮
- ChatGPT API Key 🗝️
- Purchased Excluded Assets❗
Important:
The following paid assets from the Unity Asset Store are not included in this repository, but are required to run the project. If you would like to use this project, you will need to purchase and import the assets into the following folder structure inside /DialogueDreamland/Assets/
:
DDAssets/
Plugins/
You can clone the repository with the following command:
git clone https://github.com/p-v-z/DialogueDreamland.git
Import the Excluded Assets❗ using Unity's package manager, place the assets into the following folder structure /DialogueDreamland/Assets/DDAssets/
. Import the plugins (Odin and DOTween) into /DialogueDreamland/Assets/Plugins/
.
Clone ChatGPTWrapper (or a fork of it) into the /Assets/Scripts
folder of the project.
You should now be able to open the project and run it in the Unity Editor. If you have any issues, please feel free to reach out.
- World UX
- Fix colliders and layers so that camera doesn't clip through the floor or walls.
- When you exit conversation, NPC should wave as it generates a 'goodbye' response.
- Then the conversation should be summarized and stored somewhere, to be recalled next time you interact with the NPC
- Build framework to define formulated base instructions to be given to bots, before and after
- Add settings UI to modify gfx settings
- Make AI more human-like
- Make them move around every now and then, maybe have a sit on the bench animation
- Make dialogue trigger changes in the world. For example, and NPC can serve as a guard to a door, and if you convince them to let you through, the door will open.
- Add a 'memory' system, where you can recall past conversations with NPCs.
If you would like to contribute to this project, please feel free to fork the repository and submit a pull request. If you have any questions, please feel free to reach out.
At the core of this project sits ChatGPTWrapper, which is a fork of GraesonB's project - grattitude to them 🙏.
This project is licensed under the MIT License - see the LICENSE file for details.
Made by Petrie van Zyl