Aspect | AreaStore | ObjectBoxStore |
---|---|---|
Purpose | Storing "voxelareas" for fast spatial queries | Storing objects by (collision |
Engine-internal use: Server | No (only Lua API) | Yes (object-object collision, raycasting, objects in area) |
Engine-internal use: Client | No | Yes (object-object collision, raycasting) |
Main use case | Protection | Obtaining nearby entities, raycasting |
Queries | Point query, area query | Area query, raycasting |
Serialization | Yes | Not reasonable (IDs aren't persistent) |
Caching | Yes, mapblock-based | Not reasonable |
minetest.get_objects_in_area
and minetest.get_objects_inside_radius
may not have their compat broken.
They may not take into account selection- or collisionboxes therefore.
A PointStore
might be useful to store their positions to speed up those queries.