Ecosystem Simulator
Ecosystem Simulator
A living, grid-based world where plants spread, herbivores graze, and predators hunt. Tweak growth, metabolism, reproduction, and disaster settings to watch the ecosystem stabilize… or collapse in spectacular fashion.
Play it in your browser
No downloads. Runs entirely client-side (vanilla JS + Canvas + lil-GUI).
How it works
-
🌿 Plants: logistic growth + neighborhood spread; moisture boosts growth, ash from fires slows regrowth.
-
🐇 Herbivores: seek greener cells, eat plants, burn energy, reproduce when energetic.
-
🐺 Predators: track herbivores, spend energy, reproduce on a full belly.
-
🔥 Fire: burns biomass, spreads faster in dry cells, leaves ash.
-
☀️ Drought / Rain: lower/restore moisture and shift the entire balance. ( currently under maintenance and does not work)
Controls
-
Left-click: paint with selected tool · Right-click: erase
-
Mouse wheel: brush size
-
Space: pause · S: step one tick · R: reset
-
Toolbar (bottom-left): 🌿 Plant · 🐇 Herbivore · 🐺 Predator · 🔥 Ignite · ☀️ Drought
-
Sliders (top-left): time scale, plant growth/spread, herbivore metabolism/eat/repro, predator metabolism/efficiency/repro, fire spread/burn, drought/rain, wrap.
Sandbox ideas
-
Start with a few lush patches, seed rabbits, then introduce wolves.
-
Try high predator efficiency + low plant growth to trigger boom-bust cycles.
-
Paint a drought corridor, then spark a fire and watch how ash slows regrowth.
-
Toggle Toroidal wrap to see edge effects disappear.
Features
-
True agent interactions with simple, readable rules
-
Disaster tools (fire & drought) you can trigger anytime
-
Performance-friendly pixel grid with offscreen scaling
-
Fully tweakable parameters; great for experiments or classroom demos
Tips
-
If populations crash, increase plantGrowth or lower metabolisms.
-
If predators spiral, drop predatorEfficiency or predMetabolism up a notch.
-
Use Step to observe cause-and-effect one tick at a time.
Tech
-
HTML5 Canvas (no frameworks), lil-GUI for controls
-
Single-file build; works on modern desktop browsers (Chromium/Firefox/Safari)

Leave a comment
Log in with itch.io to leave a comment.