--- id: query title: Query order: 30 --- Spatial and set queries over the live entities that carry a property, built on the World reflection ABI. Query.count and Query.first ask how many bearers there are and which is first; Query.nearest and Query.within add a position — read from a coordinate property's two int fields — to find the closest entity to a point or every entity inside a radius. A property id comes from World.prop_id and a field id from World.field_id. Everything is integer and deterministic: the same world reproduces the same answers, entity order included, every run. The scan is linear over the entity table — ample for the entity counts Ludic targets — and a game that uses Query.* gets the reflection ABI emitted automatically, no @event required.