Inspiration
The inspiration behind LiveNPC came from a desire to help game developers create more immersive and interactive NPCs. NPCs in most games feel scripted and static, which can reduce the depth of a game world. With LiveNPC, we aim to provide developers with a tool that allows NPCs to "come to life" by simulating human-like behaviors, such as dynamic conversations, memory-driven actions, and context-aware decisions.
What it does
LiveNPC serves as a server for game developers to create and manage NPCs with human-like characteristics. The server has both a frontend and a backend:
Frontend: Game developers can open the server interface and input information such as NPC age, MBTI type, hobbies, and mood. The frontend acts as a user-friendly dashboard for developers to configure and generate NPCs.
Backend: The backend manages all the complex interactions and decision-making for NPCs. NPCs can:
- Engage in dynamic conversations based on their mood and status.
- Use memory to influence future actions.
- Decide on new destinations based on their current context and history.
- Respond to requests from the game environment using file-based or API-based communication, making it easy to integrate with game engines.
How we built it
We built LiveNPC using Python, integrating GPT-based AI for lifelike conversations and decision-making. The backend server continuously listens for interaction and destination requests through file-based communication:
- Python Server: Runs in the background, processing NPC actions and updating their status.
- OpenAI GPT-4: Powers the conversations and decision-making processes, giving NPCs the ability to engage in dynamic dialogues.
- File-Based Requests: Developers can control NPC behavior through simple file modifications, allowing for seamless integration into any game.
Challenges we ran into
One of the primary challenges was ensuring smooth communication between the game environment and the backend using file-based requests. Managing NPCs' evolving states and memories dynamically while avoiding performance bottlenecks required careful design. Additionally, crafting the few-shot examples for GPT-4 to generate realistic and varied conversations presented a unique challenge in terms of balancing flexibility with consistency.
Accomplishments that we're proud of
We’re proud of creating a robust backend system that brings NPCs to life with minimal setup. The ability for NPCs to recall past events and engage in human-like conversations is a major milestone. Another accomplishment is the ease of use we've provided for game developers through a simple file-based integration process, making it accessible even for teams with limited AI experience.
What we learned
This project helped us deepen our understanding of how AI can enhance gaming experiences, particularly in making NPCs more lifelike. Additionally, creating a flexible integration layer for game developers—allowing them to interact with NPCs through APIs or file-based requests—was a valuable learning experience.
What's next for LiveNPC
The next steps for LiveNPC include:
- Building Frontend
- More complex NPC interactions: Adding group conversations and more nuanced decision trees based on long-term memory.
- Real-time API integration: Allowing games to interact with the backend in real-time through APIs rather than file-based requests.
- Enhanced Memory Systems: Allowing NPCs to not only recall events but also form relationships with other NPCs based on multiple interactions.
- Better Developer Tools: Creating a suite of tools that allow game developers to visualize NPC states, memory history, and conversation outcomes directly within their development environment.
Log in or sign up for Devpost to join the conversation.