Developer Simulates 33 Million Microbes in Browser Using WebGPU Compute Shaders

A developer rebuilt an old C#-based evolution simulator to run entirely on the GPU using WebGPU, scaling it from 200×200 cells to a massive 8192×4096 grid with up to 33 million active positions. To manage memory at this scale, simulation state was split across multiple arrays separating cell properties, energy, traits, and species-level genome data. Because thousands of cells are processed in parallel on the GPU, the original sequential logic had to be replaced with a multi-stage tick system. Each tick now proceeds through Intent, Claims, and Apply phases to resolve conflicts — such as two cells targeting the same position simultaneously — before any world state is modified. The experiment demonstrates how WebGPU's general-purpose compute capabilities can push browser-based simulations far beyond what was previously practical.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in