This is a live predatorβprey ecosystem simulator. Creatures move, hunt, eat, reproduce, and die in real time on the canvas. Everything reacts to your slider adjustments immediately β no reset needed.
Press Reset to restart with the current initial-count sliders. The sim pauses automatically when it starts; hit Resume or press Space to begin.
Each creature is an emoji with a small directional wedge beneath it showing which way it's heading. A coloured ring shows energy level β bright = well-fed, dim = hungry. A β οΈ skull appears when a creature's toxin load is dangerously high.
Grey pursuit lines show which prey each predator is targeting (toggle in Display section). The oscilloscope graph in the Population Trace panel shows population counts over time β watch for the classic LotkaβVolterra boom/bust cycles.
Use the Mouse Tool panel to pick what clicking/dragging on the canvas does:
On mobile: tap β° to open the controls panel, pick a tool, then tap the canvas. Touch-drag drops food continuously.
The base sim is a classic prey β predator two-species chain. Enable the Third Species section to add a configurable third player. Choose a preset, then customise freely:
Diet changes apply live β tick the prey/predator checkboxes and the food web updates instantly. Creatures that are now hunted will start fleeing immediately without a reset.
Food Toxicity β a configurable fraction of food spawns as toxic π (red). When prey eat toxic food they accumulate a toxin load that drains their energy and impairs reproduction. When a predator eats a toxic prey, a fraction of the toxin transfers to the predator (trophic transfer). The third species inherits toxin from whatever it eats, at an even higher transfer rate β this is real-world biomagnification.
Environmental Toxicity β background pollution drains all species continuously. Each species has its own sensitivity slider; apex predators typically accumulate the most (set their sensitivity highest).
Tip: start with Toxic fraction 60β80%, Detox rate low (0.01β0.03), and run for 500+ ticks to see the trophic chain clearly.
A full day lasts 1200 simulation ticks, cycling through four phases shown by the icon top-left of the canvas.
Neither species has a night advantage β this is a realistic general model where darkness impairs everyone equally. Fewer hunts succeed at night simply because both sides move slowly. Toggle day/night off in the Display panel if you want a time-neutral sim.
Water bodies are the most dangerous terrain feature because prey must visit them regularly to survive. This predictability is exploited by predators.
Thirst mechanics β every creature's thirst rises ~0.06/tick. Above 60/100, they actively seek the nearest water. Above 80/100, dehydration drains extra energy each tick. At 88+ they will drink even alone, ignoring safety.
Waterhole ambush β when a predator is hungry (>60/100) but too exhausted to chase (stamina <45), it stops wandering and creeps to the water body edge in stalk mode. It waits there motionless until prey come to drink. A red danger glow appears around the water when a predator is lurking β watch for it.
Group drink safety β prey won't approach water alone while a predator is nearby. They wait until at least 3 group members can drink together, or until desperation overrides caution. A lone thirsty prey approaching solo is the predator's opportunity.
Drinking distraction β while actively drinking, prey detection drops to 45% of normal. A drinking prey shows the π§ icon. Predators can spot distracted drinking prey from further than usual β this is the attack window.
Wading penalty β moving through water slows all creatures to 55% speed, creating a genuine terrain disadvantage for anyone crossing.
Cover features reduce how far away a creature can be detected. This affects both prey hiding from predators and predators stalking prey.
For prey β when a predator is spotted, prey immediately pathfind toward the nearest bush or tree (strong attraction vector). At night, even without a threat, prey slowly drift toward cover to rest. A π leaf icon appears over hiding prey.
For predators β stalking state (ποΈ icon) activates when a predator is in cover with prey visible in the distance. It creeps slowly at 35% speed, invisible to prey at close range. When prey enters burst range (~140px), the predator explodes into a sprint with a 55% speed burst for the first few ticks β the ambush launch. This mirrors real lion/leopard hunting technique.
Tip β watch the canvas for predators stationary in dark bush patches near water. They are not idle β they are waiting.
Intraspecific Competition (Third Species panel) β in nature, individuals of the same species compete for territory, mates, and food. When enabled here, third-species individuals within ~55px of each other drain each other's energy each tick, scaled by the Intensity slider.
At low intensity this is a mild carrying-capacity limit. At high intensity it can prevent the third species from ever reaching large numbers even when prey is abundant β exactly like territorial carnivores (lions, wolves) that defend exclusive ranges. This is independent of how much food exists; it's purely social competition.
Practical effect β enabling intraspecific competition at moderate intensity (0.4β0.8) tends to produce a more stable third-species population that oscillates slowly rather than booming and crashing. If the third species always overpopulates and collapses, try enabling this.
Extinction notifications β a banner pulses on canvas when a species dies out. If only one species remains it pulses repeatedly as a persistent alert. Hit Reset to restart. Tip: if predators always collapse, lower their metabolism or raise prey reproduction energy. If prey always collapse, raise food spawn rate or lower predator kill distance.