Homeβ–ΈNature & Climateβ–ΈSerengeti Savanna Ecosystem (2D)

Serengeti Savanna Ecosystem (2D)

A top-down savanna where zebras, elephants and lions run their own grazing/roaming/fleeing/stalking state machine around a water hole β€” switch the climate to rain or drought and watch it shrink or grow in real time.

Nature & Climate2DModerate60 FPSπŸ“± Mobile-adapted⇄ 3D version
2d-savanna-ecosystem-simulator β†— Open standalone

This 2D companion runs the same agent logic as the 3D savanna scene on a plain top-down canvas: eight zebras, three elephants and two lions each carry their own grazing/roaming/fleeing/stalking state, lions continuously re-target the nearest zebra while stalking, and a fleeing zebra breaks away at roughly triple its grazing speed the moment a lion closes within range. The shared water hole's radius tracks a level that rises under rain and drains under drought, exactly like the original β€” click any animal to select it and watch its state update live.

βš™ Under the hood

2D top-down savanna ecosystem with per-animal grazing/roaming/fleeing/stalking state machines, lion-vs-zebra pursuit, and a climate-driven water hole level.

savanna ecosystempredator-preywildlife migrationfinite-state agents2d canvas

2D Β· HTML5 Canvas 2D Β· 60 FPS target Β· runs fully client-side, no install

❓ FAQ

Why do the zebras suddenly speed up? A zebra switches to "fleeing" the instant a lion comes within its detection range, moving roughly three times faster than while grazing.

What happens when a lion catches a zebra? The catch counter increments and that zebra respawns at a random spot on the map so the population stays constant β€” the same rule the 3D original's hunting loop would imply.

Does the climate switch actually change anything? Yes β€” "Rain" raises the water hole level over time, "Drought" drains it, and "Dry season" lets it slowly evaporate; the pool you see on screen grows or shrinks accordingly.

What did you find?

Add reproduction steps (optional)