3 ms·
The nostalgia is real. Reminds me of the 'Falling Sand' game era. For anyone trying to scale this in JS: the bottleneck usually isn't the rendering, but the ob
by MarginalGainz 8mo ago
The nostalgia is real. Reminds me of the 'Falling Sand' game era.
For anyone trying to scale this in JS: the bottleneck usually isn't the rendering, but the object overhead/GC.
If you switch from an object-per-flake model to a single flat Float32Array for positions/velocities (Data-Oriented Design), you can typically push 10x more particles before hitting the frame budget. Keeping the memory layout cache-friendly makes a massive difference even in a high-level managed environment like V8.
- Rendello 8mo agoThe game that impresses me with its performance is Noita, they managed to balance an "every pixel is simulated" physics engine and have it run quite well.
- gloosx 8mo agoThe real bottleneck is doing it on the CPU, if you switch to WebGPU you can simulate millions of particles simultaneously in just few milliseconds per frame.