Introduction to LLMUnity
LLMUnity is an innovative project that integrates Large Language Models (LLMs) into the Unity game engine, allowing creators to enhance their games with intelligent, interactive characters. Through this integration, players can enjoy a more immersive gaming experience by interacting with AI-powered characters. The project is built on top of robust libraries, including llama.cpp and llamafile, ensuring a solid foundation for development.
Key Features
- Cross-platform Compatibility: LLMUnity supports a variety of platforms, including Windows, Linux, macOS, and Android.
- Offline Functionality: The system runs locally on your device, which means no internet connection is required, ensuring player data privacy.
- Rapid Inference: Perform fast AI computations using both CPU and GPU, compatible with Nvidia, AMD, and Apple Metal.
- Model Support: Compatible with all the major LLM models available.
- Simple Setup: Adding intelligent characters to your game requires just a single line of code.
- Free & Open: LLMUnity is free for both personal and commercial use under the MIT license.
Getting Started
Installation
Developers can install LLMUnity via two methods:
- Asset Store: Visit the Unity Asset Store and add LLMUnity to your assets, then use the Package Manager in Unity to download and import it.
- GitHub Repository: Add the package using the repository URL directly within the Unity Package Manager.
Usage
Start by setting up the LLM for your game:
- Add an LLM component to a GameObject, download a default model, or load your own.
Then, configure your characters:
- Create characters as GameObjects, assign the LLMCharacter script, and define roles, names, and other character settings.
Incorporate these characters in your script using simple methods to enable real-time interaction within your game environment.
Advanced Functionalities
LLMUnity offers additional capabilities for more tailored experiences:
- Mobile App Builds: Instructions are provided for deploying your game on Android with specific settings recommended to optimize app size and performance.
- Chat History Management: Automatically save or load chat histories to maintain a seamless user experience across game sessions.
- Prompt Processing: Pre-process prompts for faster game initialization.
- Text Completion: Beyond chats, use LLMs for generating storylines or complex character interactions.
- Remote Server Setup: Deploy a server for hosting AI computations and enable character interactions remotely.
Games Showcasing LLMUnity
Several games have already embraced LLMUnity, showcasing its versatility and interactive capabilities:
- Verbal Verdict
- I, Chatbot: AISYLUM
- Nameless Souls of the Void
- Murder in Aisle 4
- Finicky Food Delivery AI
- AI Emotional Girlfriend
- AI Speak
- Case Closed
These titles highlight how diverse gaming genres can benefit from the integration of LLMs.
How to Contribute
Contributions to LLMUnity are welcome, whether through code submissions, bug reports, or feature suggestions. Engage with the community via their GitHub repository, Discord, or sponsor enhancements for more exciting features.
Conclusion
LLMUnity is a powerful tool for developers looking to integrate advanced AI interactions into their Unity games. With its easy setup and wide-ranging functionality, it bridges the gap between traditional game development and the cutting-edge possibilities of AI-driven storytelling and interaction.