SpatialHash Implementation #115
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement spatial hashing for efficient queries on 10,000+ entities.
Definition of Done:
Wiki References:
Benchmark Results (commit
fcc0376)Added
tests/benchmarks/entity_scale_benchmark.pyto establish baseline metrics.Current Performance (2,000 entities on 100×100 grid)
Cost Per Entity Checked
Extrapolation to 10,000 Entities
Projected Gains with SpatialHash
Mechanism: With bucket size 32 and query radius 15, we check ~16 buckets × ~5 entities = ~80 entities instead of 10,000.
Frame Budget Impact
For 100 AI entities doing visibility queries per frame:
This is the higher-priority optimization for enabling complex AI at scale.
SpatialHash Implementation Complete
Implemented in commit
7d57ce2.New API
Benchmark Results
N×N Visibility (full grid)
Implementation Details