15cad3924041eb1c0cf5f5710cfd4e10cbd1b59a
Plants vastly outnumber animals, and every herbivore forage decision scanned ALL plants — the dominant per-decision cost. New PlantGrid (uniform cell grid, cell lists pooled so rebuild is alloc-free) is rebuilt once per frame from plant positions; TryFindPlant/TryFindBestPlant now gather only candidates from cells overlapping the vision radius instead of iterating every plant. The entry carries position/id/toxicity/palatability so no component refetch is needed. Selection is unchanged (nearest / max-attractiveness, id tie-break), and since the result is order-invariant the behaviour is identical and deterministic. Build + check clean. Note: the animal-side neighbour scans (threat/prey/mate/herd) are still O(animals) per decision — animals are far fewer than plants, and an animal grid is a riskier change best done with a GUI run; deferred. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LittleSim
A god-game with minimal graphics and deep simulation, built on the
mrgameeng engine (git submodule engine/).
git clone --recurse-submodules <this repo>
dotnet run --project src/LittleSim -c Release
Design docs (Russian): docs/concept.md, docs/roadmap.md.
Languages
C#
73.1%
JavaScript
25.2%
HTML
0.8%
CSS
0.7%