Mara Simulator: Web-Based African Savanna Survival
An immersive multiplayer ecosystem you survive in—no download, no account
Project Overview
Mara Simulator recreates the savanna of the Maasai Mara and Serengeti as a browser-based survival game. You spawn into a procedurally generated world and stay alive by managing health, hunger and stamina, scavenging and hunting for food, reading the terrain, and—above all—staying clear of lion prides that actively hunt. The long-term vision is a living multiplayer ecosystem where players and wildlife share one world and the food chain runs both ways.
It runs entirely in the browser on Three.js and Cannon-es—no install, no account—and takes its camera and aesthetic from Art of Rally: a high overhead angle over clean, stylized low-poly terrain.
This is an ongoing solo project, in active development since early 2025 and built spec-first—every system has a living specification that drives the work and a clear place on the roadmap. The page below describes the full game as designed, with each feature marked for what's playable today versus what's still being built.
The fastest way to get it is to play the live demo—what follows is how it works under the hood.
The Experience
Mara is built around a few design pillars:
- The food chain runs both ways. You hunt to eat, but you're also prey—and a healthy human can't outrun a charging lion. Survival is about awareness and positioning, not reflexes.
- Risk lives where the food is. Carcasses and prey cluster in the same zones the predators patrol, so every meal is a calculated risk.
- Cooperation beats the savanna. Large prey is too much for one player—taking down a buffalo is meant to need a coordinated group, and kills are shared.
- The world is indifferent. Day turns to night, the herds move, and the ecosystem keeps its own balance whether or not you're winning.
Some of this is live today and some is still being built; the breakdown below marks which is which.
Features & Status
Survival mechanics
- Core loop (live) — health, hunger and stamina tick every frame. Hunger drains a full bar in ~10 minutes; at zero it cascades into health, and starvation kills. Death shows a brief overlay, then respawns you with a new name and position.
- Condition-scaled sprint (live) — your top speed scales with your worst stat and decays the longer you run, from full speed to a forced walk. Tuned against lion speed so you genuinely can't stroll away from a hunt.
- Feeding (live) — graze carcasses scattered near the ponds to refill hunger, in the same risk zone the prides work.
- Full foraging economy (planned) — different prey feeding different numbers of players (an antelope feeds a few, a buffalo a whole group), edible carnivores that carry a sickness risk, and occasional random misfortune (illness, injury) to keep long runs tense.
Wildlife & AI
- Lion prides (live) — emergent, rule-based hunting: detection, stalking (you're more exposed from the front), encirclement, and a group-hunt threshold where the pride commits once enough members engage. Verified by a 17-test harness and live runs at 150 lions. (Lions currently render with a placeholder quadruped model.)
- Dedicated lion art (planned) — bespoke male/female lion models to replace the placeholder.
- The wider cast (planned) — herbivore herds with flocking (antelope, zebra, giraffe, buffalo), other predators (leopard, cheetah), scavengers (hyena, vulture), and water hazards (crocodile, hippo)—each with its own behavior and place in the food chain.
- Spawn as wildlife (planned) — a share of players spawning as animals rather than humans, so the ecosystem is partly player-driven.
World & environment
- Procedural terrain (live) — a 6 km² savanna (a layered sine/cosine height field plus placed hills), lakes, curving rivers, instanced vegetation, scattered rocks and props, with distance-based culling.
- Day/night cycle (live) — a dynamic sky and a sun that drives directional, ambient and hemisphere lighting (and shadow direction) across a 20-minute in-game day.
- Water (live) — wade into ponds and rivers; wading slows you and suppresses sprint.
- Weather & biomes (planned) — weather states and more varied terrain biomes.
Rendering
- WebGL pipeline (live) — ACES filmic tone mapping, 4096² PCF soft shadows, a logarithmic depth buffer, exponential fog, sRGB output, and a capped device-pixel-ratio for performance.
Movement, camera & animation
- Physics character (live) — a Cannon-es convex-hull body that follows the terrain, with WASD/arrow movement, sprint and jump.
- Follow camera (live) — an Art of Rally-style overhead camera that orbits with the player's heading and guards against terrain clipping.
- Animation (live) — an idle/walk/run blend tree with clip speed synced to ground speed, plus terrain-adaptive two-bone foot IK that plants feet on slopes.
- Mobile (live) — touch controls with a virtual joystick and sprint button.
- Swimming (planned) — crossing deep water rather than only wading the shallows.
Multiplayer
- Instant join (live) — random names, no accounts; jump straight in.
- Remote players (in progress) — other players sync in real time, buffered and interpolated ~100 ms behind for smooth motion, with join/leave handling and stale-avatar cleanup. The transport is abstracted (Socket.IO in production, a BroadcastChannel mock for local two-tab testing), and the game falls back to solo play if no server is reachable.
- Authoritative backend (planned) — a server that owns game state and resolves combat, hunting and death, enabling shared cooperative kills and anti-cheat.
Progression
- XP & leaderboards (planned) — survival rewards and ranking.
Technology Stack
- 3D / physics: Three.js (r0.158), Cannon-es (0.20)
- Language / build: TypeScript 5.2 (strict mode), Vite 5, Tailwind CSS 4
- Networking: Socket.IO client 4 over a swappable transport layer
- Quality gates: Vitest unit tests, ESLint and Prettier,
tsc --noEmit—all enforced in GitHub Actions CI - Workflow: spec-driven development—
docs/specs/*track each system's contract and per-feature status - Deployment: static Vite build on Firebase Hosting; a Socket.IO server backs multiplayer
Technical Implementation Highlights
Condition-scaled sprint
Sprinting isn't a flat multiplier. Top speed scales with the player's "condition" (a weighting of their worst survival stat) and decays with distance sprinted—full speed, then a degraded floor, then a forced walk with a recovery delay. The numbers are tuned against lion speeds so escaping a hunt costs a real, finite resource rather than just holding Shift.
Emergent lion hunting
Pride behavior emerges from per-lion rules rather than a central state machine: directional danger build-up, encirclement slots with repulsion between herdmates, a threshold that pulls the whole pride into a group hunt, and a walk/charge band so nearby lions stalk and circle instead of sprinting in place. It's covered by a unit-test harness and was evaluated live at herd scales up to 150.
Modular, spec-driven architecture
The game is composed of focused managers—world, player (physics, model, movement, camera, state, animation), animals, input, UI, network and audio—each with its own lifecycle. Paired with per-system specs and CI gates, that structure keeps each piece independently testable and turns an ambitious roadmap into something you can build one feature at a time.
Roadmap
- Foundation (complete) — world, rendering, day/night, physics movement and animation
- Survival (complete) — the hunger / health / stamina loop, sprint, feeding, death and respawn
- Predators (in progress) — lion-pride hunting AI (live); dedicated lion art (next)
- Ecosystem (planned) — the full animal cast, flocking herds, water hazards, spawn-as-wildlife
- Multiplayer backend (planned) — authoritative server, cooperative hunting, shared kills, anti-cheat
- Depth (planned) — weather and biomes, the full foraging economy, XP and leaderboards
Skills Demonstrated
- Real-time 3D in the browser: Three.js rendering pipeline, lighting and shadows, day/night, instancing and culling
- Physics & character control: Cannon-es convex-hull bodies, terrain following, and tuning movement for feel
- Game AI: emergent, multi-agent hunting behavior, verified by tests and live evaluation
- Systems design: modular manager architecture, spec-driven development, TypeScript strict mode, and CI quality gates
- Networking: client-side entity interpolation, a transport-abstraction layer, and graceful degradation
A solo project in active development—this page tracks the full design and updates as features ship. The clearest picture is always the running game: mara.ike.work.