![]()
AI-powered NPCs (Non-Playable Characters) are some of the essential breakthroughs led to by way of LLMs in games.
LLMs, or Large Language Models, make it possible to design “intelligent” in-game characters that can engage in realistic conversations with the player, perform complex actions and follow instructions, dramatically enhancing the player’s experience. AI-powered NPCs represent an enormous advancement vs rule-based and heuristics systems.
Today, we’re excited to introduce NPC-Playground, a demo created by Cubzh and Gigax where you possibly can interact with LLM-powered NPCs and see for yourself what the long run holds!
You may play with the demo directly in your browser 👉 here
On this 3D demo, you possibly can interact with the NPCs and teach them latest skills with just just a few lines of Lua scripting!
The Tech Stack
To create this, the teams used three essential tools:
-
Cubzh: the cross-platform UGC (User Generated Content) game engine.
-
Gigax: the engine for smart NPCs.
-
Hugging Face Spaces: probably the most convenient online environment to host and iterate on game concepts in an open-source fashion.
What’s Cubzh?
Cubzh is a cross-platform UGC game engine, that goals to offer an open-source alternative to Roblox.
It offers a wealthy gaming environment where users can create their very own game experiences and play with friends.

In Cubzh, you possibly can:
-
Create your personal world items and avatars.
-
Construct fast, using community-made voxel items (+25K to date within the library) and open-source Lua modules.
-
Code games using a straightforward yet powerful Lua scripting API.
Cubzh is in public Alpha. You may download and play Cubzh without cost on Desktop via Steam, Epic Game Store, or on Mobile via Apple’s App Store, Google Play Store and even play directly out of your browser.
On this demo, Cubzh serves because the game engine running directly inside a Hugging Face Space. You may easily clone it to experiment with custom scripts and NPC personas!
What’s Gigax?
Gigax is the platform game developers use to run LLM-powered NPCs at scale.
Gigax has fine-tuned (trained) large language models for NPC interactions, using the “function calling” principle.
It’s easier to take into consideration this by way of input/output flow:
-
On input, the model reads a text description (prompt) of a 3D scene, alongside an outline of recent events and a listing of actions available for the NPCs (e.g.,
,,, etc.). -
The model then outputs one among these actions using parameters that check with 3D entities that exist within the scene, e.g.
say NPC1 "Hello, Captain!".

Gigax has open-sourced their stack!
You may clone their inference stack on Github.
For this demo, their models are hosted within the cloud, but you possibly can download them yourself on the 🤗 Hub:
The NPC-Playground Demo
Interact with LLM-powered NPCs in our 3D Playground, in your browser: huggingface.co/spaces/cubzh/ai-npcs.
Just clone the repository and modify cubzh.lua to show NPCs latest skills with just a few lines of Lua scripting!
Make your personal demo 🔥
Fiddling with the demo is just step one! If you happen to’re keen on customizing it, try our comprehensive ML for Games Course tutorial for step-by-step instructions and resources.
![]()
The tutorial 👉 here
As well as, you possibly can check the documentation to learn more on find out how to tweak NPC behavior and teach NPCs latest skills.
We cannot wait to see the amazing demos you are going to make 🔥. Share your demo on LinkedIn and X, and tag us @cubzh_ @gigax @huggingface we’ll repost it 🤗.
—
The collaboration between Cubzh and Gigax has demonstrated how advanced AI can transform NPC interactions, making them more engaging and lifelike.
If you desire to dive more into Cubzh and Gigax don’t hesitate to affix their communities:
And to remain updated on the newest updates on Machine Learning for Games, do not forget to join the 🤗 Discord
