Llama Village: a virtual world powered by local AI with llamadart
Llama Village in motion. The characters’ dialogue is generated by an on-device model. Watch the full trailer on GitHub I wanted to try building a 3D game with flutter_scene . I was already working on llamadart, so I thought it would be fun to use local AI in the game too. My starting idea was fairly loose: make it look good, keep it simple, and put Dash, the Flutter mascot, in a scene with some…
Llama Village is a virtual world powered by local AI, featuring characters that generate dialogue using an on-device model. The creator, who was originally working on llamadart, wanted to incorporate local AI into the game to showcase different AI working together. Initially, the game concept was loose, focusing on making it look good, keeping it simple, and including Dash, the Flutter mascot, along with some llamas.
The visual style evolved from hand-drawn looks and Borderlands-inspired aesthetics to a softer film style, as earlier renders kept looking glitchy. Several game ideas were tried, but the creator was not satisfied with their gameplay. Eventually, they settled on a village where llamas would live and interact on their own, allowing them to develop personalities, thoughts, conversations, and goals.
Each llama in the village has its own knowledge, relationships, and goals. They make plans, walk around the village, and engage in conversations. The model keeps track of the information they know and how they acquired it. For example, June knows that Mo knocked Pip's scarf into the pond because she heard it from Mo, while other entries are things she observed herself.
The game features multiple agents, each with its own language model and context. An optional Laya decision model helps choose casual conversation topics, while movement, needs, knowledge tracking, and endings are handled in code. Once conversation takes place, the model reports which facts were mentioned and suggests changes to mood and friendship, which the game then checks before accepting.
Players control Dash, who can visit llamas and generate four possible things he could say while on the way. Dash can help correct false information or spread rumors, which affects the llamas' trust and mood. The game's performance is optimized by generating text and rendering during the same process. However, bringing the same experience to mobile devices requires further consideration of memory, inference, and rendering budgets.
The game culminates in a Berry Festival, which serves as a destination for the week. The llamas perform, and the winner is chosen based on relationships, rumors, and trust built throughout the game. After the festival, the game turns the week's events into a picture book, with the model writing pages using a digest of those events and pictures captured during play.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
