Skip to content

Repository files navigation

pixelz

A falling-sand pixel engine inspired by The Powder Toy, Sandspiel, and Noita.

The simulation, particle interactions, random number generation, and dirty-cell tracking run in Rust/WebAssembly. TypeScript handles browser input and renders the compact list of changed cells to the canvas.

Development

Install Rust, wasm-pack, and Node.js, then:

npm install
npm run dev

npm run build compiles an optimized WASM module and creates the production Vite bundle. npm test runs the Rust engine tests.

Material interactions

  • Dirt falls like sand. Once it stops, it receives a random 5–15 second packing timer that resets if the particle moves again.
  • Packed dirt waits 10–60 seconds, then becomes grass if the cell above is empty; otherwise, it starts a new timer.
  • Grass runs the same timer and returns to packed dirt if covered. It is also flammable; burning it restores packed dirt instead of creating fire.

About

A prototype falling-sand game in the style of things like The Powder Toy, Sandspiel, and Noita

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages