Purpose & Overview¶
Build a modular, data-driven, game-friendly ecosystem for Unity. The add-on provides believable plant and animal dynamics (growth, foraging, predation, reproduction, and pollination) with a simple editor workflow and live monitoring.
Important
This package prioritizes game readability and control over scientific accuracy. You tune parameters to get fun, stable behaviors that fit your design.
Who is this for?¶
- Designers — want a working ecosystem in minutes: terrain → flora/fauna → spawn → play.
- Technical artists — need climate/height band logic and consistent visuals.
- Programmers — want clean, extensible components (
AnimalAgent,GrowthAgent) they can swap or extend later.
Goals¶
- Fast setup: seed a world in 60 seconds with presets and sane defaults.
- Believable loops: herbivores eat plants; predators hunt; pollinators boost plants and linger (predator window).
- Self-regulation: energy drain + reproduction cooldowns + local density checks prevent runaway growth.
- Editor-first: terrain shaping, water level, spawn filters, and HUD are all authoring friendly.
- Extensible: add new species/prefabs without changing core systems.
Non-goals¶
- Hard-science ecology or precise population models.
- Full AI navigation/pathfinding authoring (works without, can be extended).
- Networked/multiplayer simulation (out of scope for v1).
Design principles¶
- Simple knobs, clear effects
Few parameters with big, readable outcomes (e.g.,energyDrainPerSec,birthIntervalSeconds). - Local interactions > global rules
Agents react to nearby things (Overlap queries), not distant omniscience. - Asymmetric opportunities
Pollinators linger after visiting → predators get a natural chance window. - Editor determinism
Seed + noise → repeatable terrain. Seeding respects height/water filters.
Architecture (high level)¶
-
Flora —
GrowthAgent
Growth scaling, maturity, max age, seeding (chance/radius, local density), optional pollination boost. -
Fauna —
AnimalAgent
Roles (Herbivore / Predator / Pollinator / Neutral), energy & hunger, perception, interaction distance, reproduction. -
Markers —
PollinatorEmitter,HerbivoreEmitter
Auto-added based on the animal role; used by other systems as hints. -
HUD — Ecosystem monitor
Multi-camera grid, per-agent overlays (energy, age, role, reproduction timers).

Authoring workflow¶
- Terrain
SetMin/Max Heightand Water Level. Generate with Seed + Noise. - Flora
Prepare plant prefabs withGrowthAgent. Optional: small trigger collider;tag=Plant. - Fauna
Prepare animal prefabs withAnimalAgent. Select role (Herbivore/Pollinator/Predator/Neutral). - Seeding (Editor)
Choose ratios & filters (skip underwater, height ranges). Click Spawn. - Play + HUD
Observe multi-camera grid; validate behaviors; tweak parameters.
Tip
Add a tiny trigger collider to plants (e.g., sphere radius 0.4–1.0) to make proximity queries reliable and cheap.
Ecosystem dynamics (at a glance)¶
- Herbivore → seeks plants and consumes them → gains energy → may reproduce.
- Pollinator → seeks plants and visits (non-destructive) → gains energy → lingers on ground (e.g., 30s).
- Predator → seeks herbivores/pollinators and strikes → gains energy → may reproduce.
- Neutral → wanders (ambient life).
Stability comes from:
- Energy drain over time (starvation kills).
- Reproduction attempts with cooldowns and local density caps.
- Seeding caps on plants (max local density).
Key parameters (quick reference)¶
| Domain | Parameter | Effect | When to increase | Typical range |
|---|---|---|---|---|
| Perception | senseRadius |
How far agents look for targets | If agents struggle to find food/prey | 20–80 |
| Interaction | interactDistance |
Eat / visit / strike distance | Flyers can’t reach plants | 1.3–3.0 |
| Energetics | energyDrainPerSec |
Idle burn rate | Population explodes | 0.15–0.40 |
| Hunger | hungryEnergyFraction |
Hunger threshold | Agents roam but rarely forage | 0.7–0.95 |
| Reproduction | birthIntervalSeconds |
Time between attempts | Pop too fast/slow | 20–40 |
| Plants | seedChance |
Daily seeding probability | World feels barren | 0.02–0.08 |
| Plants | maxLocalDensity |
Nearby same-species cap | Clumping is excessive | 5–10 |
Note
Water level is a hard rule for seeding filters. Underwater spawn is skipped unless you opt in.
Typical use cases¶
- Open-world wildlife — deer graze; snakes hunt birds that just visited plants.
- Builder/sandbox — player introduces species and watches balance emerge.
- Education/visualization — pollination cycles, predator windows, carrying capacity.
Success checklist¶
- [ ] Terrain water level matches any water visuals (planes/oceans).
- [ ] Plants have small trigger colliders and/or
tag=Plant. - [ ] Flyers have
interactDistance ≥ 2.0and a non-zeropostEatLingerSeconds. - [ ] Reasonable
energyDrainPerSec+birthIntervalSecondsto avoid runaway growth. - [ ] HUD shows multiple agents; cameras map correctly to overlays.
FAQ¶
Is navigation required?
No. The base system uses simple movement + proximity queries. You can extend with NavMesh later.
Why do pollinators linger?
To create a readable predator window and make pollination visible in gameplay terms.
Why are plants not detected?
Usually missing colliders/tags or too small interactDistance. Add a small trigger and try 2.0–3.0 for flyers.
Next steps¶
- Terrain — height, water, noise, bands
- Flora —
GrowthAgent, seeding, pollination boost - Fauna — roles, energetics, reproduction
- Prefabs — preparing assets cleanly
- Seeding (Editor) — ratios, filters, underwater skip
- HUD & Monitoring — camera grid and overlays