Building a Game Engine with Intent-Based Asset Tagging
AI Engineergo watch the original →
the gist
Nereu replaces traditional game engine boilerplate with an intent-based asset tagging system and uses a level-of-detail approach to manage LLM context, allowing users to build games through natural language descriptions.
Intent-Based Asset Architecture
Traditional game engines require developers to manually manage complex hierarchies of meshes, renderers, colliders, and rigid bodies. Nereu abstracts this by treating every object as an asset defined by intent-based tags rather than implementation details. By leveraging Entity Component System (ECS) principles, the engine allows users to apply tags like "character," "animated," or "drivable" to any asset. Because these tags are decoupled from specific object types, a user can tag a building as "drivable" to instantly integrate it into a racing mechanic without writing custom movement logic or boilerplate code.
Context Assembly via Level of Detail
To prevent LLM context bloat while maintaining scene awareness, the engine applies a "level of detail" (LOD) strategy to the data sent to the AI assistant. Instead of passing the entire scene graph, the engine filters context based on the user's current focus:
- Assets in the immediate vicinity of the user's selection are provided with full tag values and configuration settings.
- Distant assets are collapsed into simplified representations containing only their type and position.
- Irrelevant background elements, such as grass or environmental noise, are excluded from the prompt entirely.
This approach ensures the assistant remains responsive and focused on the specific game design task at hand, rather than attempting to process the entire state of the project for every interaction.
AI-Driven Development Workflow
- Vision models are used to automatically generate descriptive tags for the library of 6,000 to 7,000 assets, mapping raw 3D files to human-readable intent labels.
- The assistant functions as a facilitator to get users unstuck, rather than a generator intended to "one-shot" a finished product.
- The engine runs on a JavaScript-based architecture in the browser, allowing for extensibility while keeping the core interface focused on natural language interaction.