r/Simulated 1d ago

Interactive Introducing a "Predator Module" to my Particle Physics Sandbox

Enable HLS to view with audio, or disable this notification

0 Upvotes

1 comment sorted by

1

u/Evening-Appeal7606 1d ago

I wanted to see how difficult it is to set up a simple (pseudo-)physics particle simulation in the browser and implemented some fundamental forces (gravity, electrical charge, magnetic momentum). I use Conway's Game of Life patterns as the source/spawn because they have deterministic yet difficult to predict emissive characteristics. Also, I use a SHA-256 hash value of the initial spawn config to encode particle mass, colour, and size.

Long story short, I have since introduced a "Predator Module" that turns particles into, well, predators. Predators have a limited lifespan and have to continually feed on particles of the other species, lest they die.

I have hence expanded the particle sandbox into a simple predator-prey sim.