AI-powered NPCs (non-playable characters) are one of the most important breakthroughs that come with using LLM in the game.
LLMS, or large language models, dramatically enhance the player’s experience by allowing you to engage in realistic conversations with players, perform complex actions, and design “intelligent” in-game characters that can follow instructions. AI-powered NPCs have made significant advances in rule-based and heuristic systems.
Today, I look forward to introducing NPC-Playground, a demo created by Cubzh and Gigax, and interacting with NPCs with LLM to see for myself how the future holds.
You can play the demo directly in your browser 👉
In this 3D demo, you can interact with NPCs and teach new skills with just a few lines of LUA scripts!
Technology Stack
To create this, the team used three main tools:
CUBZH: Cross-Platform UGC (User Generated Content) Game Engine.
Gigax: Smart NPC engine.
Embracing Face Space: The most convenient online environment where you can host and iterate gaming concepts in an open source way.
What is cubzh?
Cubzh is a cross-platform UGC gaming engine and is intended to provide an open source alternative to Roblox.
It provides a rich gaming environment where users can create their own gaming experiences and play with their friends.
In Cubzh you can:
Create your own world items and avatars.
Build fast with community-made voxel items (so far +25K) and open source LUA modules.
A code game using the simple and powerful LUA script API.
Cubzh is located in the public Alpha. You can download and play Cubzh for free on your desktop on your mobile via Steam, Epic Game Store, Apple’s App Store, or Google Play Store, or play it directly from your browser.
In this demo, Cubzh acts as a game engine that runs directly within the embracing facespace. Easy to clone to try custom scripts and NPC personas!
What is Gigax?
Gigax is a platform game that developers use to run LLM-powered NPCs at scale.
Gigax has a large (trained) language model that is fine-tuned for NPC interactions using the principle of “function call”.
It’s easier to think about this from an input/output flow perspective.
For input, the model reads the text description (prompt) of the 3D scene, and reads the description of recent events and a list of actions available in the NPC (e.g.,,, etc.).
This model then outputs one of these actions using parameters that refer to 3D entities present in the scene. For example, NPC1: “Hello, Captain!”
Gigax has opened sourced the stack! You can clone the inference stack on GitHub.
In this demo, their models are hosted in the cloud, but you can download them yourself in the 🤗Hub.
NPC-Playground demo
Interact with LLM-driven NPCs in the browser’s 3D playground: huggingface.co/spaces/cubzh/ai-npcs.
Clone the repository and modify Cubzh.lua and tell me about new NPCS skills in a few line Lua script!
Create your own demo
Playing with the demo is the first step! If you’re interested in customization, check out our comprehensive ML course tutorial for step-by-step instructions and resources.
The tutorial is here
Additionally, you can check the documentation to learn more about how to adjust the behavior of your NPCs and teach them new skills in NPCS.
I can’t wait to see the amazing demo you’ll make. Share the demo on LinkedIn and X and tag @cubzh_ @gigax @huggingface.
–
The collaboration between Cubzh and Gigax has made AI more attractive and realistic, demonstrating how advanced AI can translate NPC interactions.
If you want to dive further into Cubzh and Gigax, don’t hesitate to join the community.
And don’t forget to join 🤗Discord to keep you up to date with the latest updates on machine learning for games