PolyFish is a real-time aquatic ecosystem simulation built entirely in the browser with Three.js and WebAssembly physics. Fish hunt plankton, dolphins hunt fish, manatees graze kelp - and eventually, everything dies. This is the story of how it was made.
What started as a simple fish tank demo evolved into a full documentary-style nature simulation, complete with procedural animation, spatial audio, and a cinematic camera system that shoots the scene like a wildlife film. Along the way we solved problems in soft-body physics, GPU instancing, creature AI, and ecosystem balancing.
Each chapter of this site walks through a major system in the game, with interactive WebGL demos you can play with directly in the browser.
Click a chapter to explore the tech behind it.