What is it?
Particle Life is an emergent complexity simulation similar to Conway’s Game of Life. Through simple interactions between particles (based on their colour), a beautiful sea of “life” emerges. The rules of the simulation are similar to an n-body and determined by color-color relations. While in a traditional n-body simulation (like a gravitational one) the forces are symmetric (body A exerts an equal and opposite force on body B), the forces in a particle life simulation are asymmetric (blue particle can exert a different force on orange particle compared to orange on blue). This leads to certain colours bunching up, other colours being repelled, and a constantly evolving, visually appealing landscape. Part of the fun in this simulation is seeing larger structures forming and acting like creatures, when in fact there are just a few simple rules behind the scenes.
This version
This is my take on it written in Rust using macroquad and egui (I initially wrote it with raylib but found UI elements difficult to code). You can view the HTML file, get the compiled WASM binary get the compiled WASM binary, and check out the repository.
Demo
This demo runs best on desktops and gives a feel for the simulation along with a few parameters to tweak.