Files
Soul_Game/scripts
mmcghen d7448c497d Grid-scope the food-gift and trade-partner searches
Route the two remaining full-population scans (a hungry villager seeking
someone with food; a trader seeking a partner) through the NPC spatial
grid with a 60-cell reach instead of scanning all ~80 villagers. Realistic
reach, cheaper at scale.

(A resource-node spatial index was also tried and reverted: benchmarked
~13% slower - at ~1,260 nodes the linear array scan is cache-friendly and
beats a dictionary-of-lists ring search. The node scan was never the
bottleneck; profile before optimizing next time.)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 18:28:35 -04:00
..