Games from Nothing: Black & White Exercise #4 — Weak Forces

simple_shower

My particle system started as a simple shower of colorful circles. After that was done, I tried to get the circles to react to the cursor/mouse position.  I basically wanted a gravity well to be located where the mouse was, but I had a hard time figuring out just how to code that.  After some fiddling with it, though, I did manage to get a satisfactory reaction from the circles.

weak_1

The forces are fairly weak, and therefore hard to present through static images, but notice the tendency toward the large white circle (the indicator for the cursor).

If you hold the mouse button down/hold your finger to the tablet, the colors, become slightly brighter, and the force applied to each circle is doubled.

stronger_1 stronger_2

Overall an interesting little intro into the world of particle systems.  I still am quite interested in learning how to properly code a gravity well.