What is Godot?
Godot is a free, open-source game engine (MIT-licensed) for making 2D and 3D games. It uses a flexible node-and-scene system with its own GDScript (plus C# and visual scripting) and includes a built-in editor that lets you export to Windows, Mac, Linux, mobile, HTML5, and more.
What is the Player2 AI NPC Plugin?
The Player 2 AI NPC Godot plugin allows developers to easily create AI NPCs in their Godot projects. This plugin adds a `Player2AINPC` node that functions like an AI brain that you can send chats and notifications to.
We will handle the event queue, long-term memory and function call implementation for your AI NPCs, so your characters feel alive with minimal coding.
The plugin uses free AI APIs from the player2 App. Just open Player2, and the plugin connects automatically, so you can dive right into building your world instead of wrestling with keys or settings. When your game is ready, we’ll share it with our community of 40,000+ active players eager for AI-driven adventures.
How does it look in action?
Here's an example video of the agent in action:
How to set up in Godot?
The AI NPC Node can be connected to your project with Godot signals.
First, add a Player 2 AI NPC Node
Then, feel free to modify the system message. Values within dollar sign and brackets (like ${player2_selected_character_name}) get filled in at runtime. Feel free to remove those to give the agent less information.
Then, call the node's `chat` or `notify` function and receive data from its signals!
How does the LLM/STT/TSS side of things work?
The AI APIs are accessed through the Player2 app. Players of your game need to install and run the Player 2 Launcher, which has API calls at https://127.0.0.1. Because users have different tiers of subscriptions, developers can integrate and access these LLMs in their games at no cost! We also provide revenue shares back to developers.
Where to download?
The Player 2 AI NPC Godot plugin is accessible here: https://github.com/elefant-ai/player2-ai-npc-godot.
If you want an example project to get started, a simple chat example project, as well as a prison escape mini game, are provided in the git project.
Download the addons folder and import it into your project.
An official downloadable Godot asset is coming soon!
Player2 is built for community and indie developers like you. If you have any feedback or feature requests, please join our Discord and ask there!