A downloadable project for Windows

PLEASE NOTE: This program runs poorly on some graphics cards.


My implementation of Particle Life, written in HLSL in the Unity game engine. My goal with the project was to refine the Particle Life concept into a polished experience designed for meditation and de-stressing. Through this project, I have found out that I really enjoy coding as an artform, rather than as a tool for solving practical problems, so I will probably make more like this in the future.


The program includes the following features on top of the classic Particle Life formula:

- The rules and colours of the simulation smoothly change over time to avoid equilibriums and to keep it interesting to look at over a long period of time.

- The brightness of each particle is proportional to its velocity to avoid the screen looking too busy.

- An RGB wave simulation is run on top of the simulation to create colourful ripples behind moving particles. This also makes particles look more smooth with less aliasing artefacts.

- Every particle emits stereo sound when moving to make them feel more tactile and part of the environment,


The simulation runs entirely on the GPU to avoid any significant amount of data getting moved between the CPU and GPU, which would be very slow. In this build, there are 20k particles, but my archaic 1070 comfortably runs up to 30k particles at 60 fps. On my 1050 ti laptop, it only runs up to around 15k particles before it start slowing down, however. I have a few ideas that could dramatically increase performance and make it more usable on an average laptop, like implementing space partitioning on the GPU by sorting particles into cells with something like parallel radix sort.


If you want to see a video explaining how everything works in more detail, let me know. I am also happy to answer any specific questions about the implementation in the comments.

Download

Download
ParticleLife.zip 54 MB

Leave a comment

Log in with itch.io to leave a comment.