Comment by geminigemino
22 days ago
Thanks for the feedback. There are some O(n²) components (mate finding, pathogen spread, proximity), but they’re mitigated with zone-based spatial hashing and throttling, so it’s not naive all-vs-all.
One big recent win was actually on the rendering side: I was rebuilding complex morphology geometry every frame for large organisms. I’ve added caching for that, which significantly reduced spikes during population blooms.
At very high populations the sim tick itself becomes the bottleneck, even for mostly O(n) logic per organism. When populations crash (which they usually do ecologically), performance recovers.
Quad trees / more adaptive structures are on my radar, but I’m trying to balance complexity vs predictability for now.
No comments yet
Contribute on Hacker News ↗