When it doesn’t load submaps, it’s not that expensive. I tested the new pathfinding with ~20 NPCs pathing to the other end of the bubble and it was manageable (much less expensive than the drawing call was on my computer).[/quote]
It has to load submaps, it would be pointless if it were happening only in the reality bubble (then you get the fun ‘feature’ of events that only happen if you’re nearby). The only way to do it I can think of is to mark submaps as having eligible vermin attractors on unload, which means checking a bunch of nearby submaps (some of which would otherwise be unloaded, this implies pinning submaps in memory just for this feature). The good news is subsequent processing is cheap to free, you can just defer it until the next time the submap is loaded.
A flood fill would to be kind of reasonable, except that half or more of the operations are going to have to hit the underlying submaps instead of caches since it’s going to happen on map areas outside the reality bubble.
[quote=“Coolthulhu, post:7, topic:9125”]Though the entire feature wouldn’t be complete without the “monsters stealing items” thing. Otherwise rats would spawn on food and then just roam around it.
And monsters stealing items is a much harder issue to implement, because it requires caching to avoid 10+ squirrels parsing all piles of corpses in sight just to find some acorns.[/quote]
I don’t see that as a problem, we can just dial down the frequency at which vermin check for nearby items until it doesn’t matter, and limit the area they search.