A high-performance, physics-free spatial query library for Roblox. Maintain 60 FPS with 1M+ zones.
documentationThe Physics Bottleneck. Traditional zone libraries act as wrappers for Roblox's physics engine (e.g., GetPartsInPart or .Touched), binding spatial logic to collision meshes. This results in expensive geometry calculations, unpredictable overhead, low flexibility, and much worse performance as the number of zones grows.
Clean Architecture. By separating what you track (Groups), where you track them (Zones), and how you respond (Observers), QuickZone eliminates monolithic, instance-bound logic and keeps your codebase clean.
Physics-Free Scaling. QuickZone achieves O(N log Z) scaling by bypassing the physics engine in favor of pure geometric math and a custom Linear Bounding Volume Hierarchy (LBVH). Performance is driven by the number of entities, while the number of zones is virtually irrelevant.
Agnostic. Whether you prefer classic event-driven programming, robust lifecycle management, or zero-allocation iterators for ECS architectures, QuickZone can fit your workflow.
Total Performance Control. The runtime cost is in your control. A budgeted scheduler smears entity processing across frames and stops once the CPU time you allow is used up. Paired with contiguous arrays that produce virtually zero garbage collection (GC) pressure, QuickZone produces a flat, predictable performance profile.
Unit Tested. A rigorous unit testing suite ensures stable and predictable behavior across all systems.
-
Endless Scale: The number of zones barely affects per-frame cost, because each lookup walks the LBVH in O(log Z). Maintain 60 FPS even with over a million zones in your game.
-
Track Anything: Track Players, BaseParts, Models, Attachments, Bones, Cameras, or even custom tables. If it has a position, QuickZone can track it.
-
Budgeted Scheduler: Set a frame budget (e.g., 1ms) to keep entity processing from causing lag spikes. Workloads are smeared across frames to maintain a flat, predictable performance profile.
-
Shape Support: Built-in for Blocks, Balls, Cylinders, Wedges and CornerWedges without relying on physics collision meshes. MeshParts and Unions are supported through their collision geometry.
-
Declarative Lifecycles: Replace event-based logic with the observe pattern for declarative logic. There is no need to manually track
onEnterandonExitstates. -
Decoupled Architecture: Separate where tracking happens (Zones) from who is being tracked (Groups) and how the system responds (Observers). Bind complex behaviors to groups of entities with zero boilerplate.
-
ECS-Ready: Built-in support for zero-allocation iterators and deterministic manual stepping, making it a perfect fit for ECS architectures and data-oriented workflows
-
Minimal GC Pressure: The spatial update loop reuses its arrays and tree nodes instead of allocating new tables, so QuickZone produces virtually zero garbage and avoids memory-related stutters.
-
Dynamic Zones: Use moving zones at very little cost. QuickZone maintains separate Static and Dynamic LBVHs for maximum efficiency.
Pull requests are welcome! Read the contribution guidelines to set up your local environment, run tests, and submit code changes.
See the licence for details.