Falling Everything

  • Svelte 5
  • TypeScript
  • Vite
  • Web Workers
  • planck.js
  • PWA
  • Cloudflare Pages

A pixel physics sandbox where every pixel is simulated. Pour lava on ice, set oil on fire, drop a black hole in a lake & see what happens.

Demo(opens in new tab) Code is private

Best on desktop. It uses a mouse & keyboard, and a lot of CPU.

Falling Everything screenshot

Overview

Falling Everything is a falling-sand game, the kind where every pixel on screen is its own little piece of sand, water, fire, or whatever else. I got fascinated with pixel simulations after playing Noita, and wanted to build one of my own (while trying not to copy Noita's art style).

I actually started it in Odin. But I'm really into games that run in the browser, so I ported it, rule for rule, to TypeScript & Svelte to see how far I could push the same idea on the web.

Pretty far, it turns out. The world is over a million cells, and the simulation runs on several Web Workers at once, all sharing one block of memory. Getting that to work meant splitting the world into a checkerboard of chunks, so no two threads ever touch the same pixels, and letting anything that's settled go to sleep so it costs nothing.

Crates, rocks, and steel beams are rigid bodies (via planck.js), but they're made of pixels too. So they burn, melt, get eaten by acid, get cut with a laser, and split into new pieces when they break.

Then I got carried away with materials. There's the usual sand, water, oil, and lava, but also lightning that electrifies water, fireworks, mercury that steel floats on, crystals that grow through water, antimatter, a virus, a Nyan streak that leaves a rainbow trail, and black holes that swirl everything into them before collapsing in a blast.

It was a big change from my usual web work. Most of my projects are about pages, data, and UI. This one was all about performance, threading, and a lot of tiny rules that have to play nicely together, which taught me a ton.

Copyright © 2026 MaDr™, MaDrCloudDev™, Matthew Drish | MaDr.io