Leonid PershinandClaude Opus 4.8 b61c6acff3 Perf: spatial grid for animal neighbour queries (drops O(animals^2) AI scans)
Generalized the plant grid into SpatialGrid<T> (PlantGrid.cs -> SpatialGrid.cs)
and added an animal grid. AnimalDecisionSystem rebuilds both once per frame; the
animal grid entry precomputes the fields the AI needs (species, body size, eats-meat,
sex, adult) so queries do not refetch components. Threat / prey / mate / herd scans
now gather only neighbours from cells overlapping the vision radius instead of
iterating every animal per decision. IsThreatTo/IsPreyFor take precomputed values;
dead MateNeedIndex removed. Mate stays species-agnostic (unchanged behaviour).
Added id tie-breaks to threat/mate selection so results are order-invariant ->
fully deterministic regardless of grid iteration order. Build + check clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 22:55:27 +03:00

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.

S
Description
No description provided
Readme
224 MiB
Languages
C# 73.1%
JavaScript 25.2%
HTML 0.8%
CSS 0.7%