I came across some really cool particle games lately, all in the style of the original "Falling Sand" java applets, and I really wanted to make something like that.
So guess what, I did! :)
It was mostly an exercise in C++ for me, since I had never really done anything with C++'s cool features like classes, its different list types, and all the advanced memory management features in general. Up until now I used bare C for everything and didn't really feel the need for those features, but it turned out they were really useful for this project. I use my own Particle class to manage the particle's actions and properties, which is way more readable and comprehensible than doing something like that in C. I also use a vector for the big list of all the particles, and it was really useful, it would have been a lot harder to do it with pure C.
About the program itself, I'll just show you the output of "./particletest -h":
Usage: ./particletest [options] -w Set window size (default: 800x600) -s Set particle size (default: 2) -h View this help. In-game keys: lmb Add particles of current type rmb Erase particles at cursor number keys Select particle type scrollwheel Scroll through particle types t Toggle faucet (current type if nonsolid) c Clear the screen i Show FPS (not avaraged) g Press this when stuff glitches
I think that explains itself. If you want to know what the individual particles do, then watch the video ;)
Last but not least, here is the source code! It only depends on SDL, so make sure to the SDL development libraries.
And here is a windows (32bit) build. I haven't tested it extensively, but it should work. It depends on SDL so I've packed SDL.dll with it. Just keep it in the same folder (or throw it in system32) and it'll work.