So, as previously discussed… I wanted to try and focus on a way to create empathy as a drive for interaction. The concept ended up being that you would start playing with the program… piling the snow onto the man by blowing it in his direction with the mouse. The man would then send a distress signal and you would realize you were killing him… only to have to find a way out.
Alas, I didn’t get past the snow.
This is not to say I’m unhappy about this sketch. The control of the snow was something incredibly daunting when I first started this. I had no idea how to approach it.
I started with arrays — having the snow originate around the mouse. However, I couldn’t figure how to control the individual pieces of snow once I had done this.
Then I moved on to trying to create an array of objects that originated at the top of the screen and moved down . However, when they reached the bottom, I had to loop them back to the top to get the feeling of snow (set the y position back to 0). All was fine, until I added the mouse interaction, which caused “holes” in the snow-falling, as you would reset the y position by adding speed, and then reset again when you got down to the bottom… but there was nothing to reset in the empty space where the sped-up snow used to exist and holes were permeate the frame. I got stuck there for roughly… 3 days.
So I started looking at a ton of examples. A great “snow” example here was very informative… but manipulated individual pixels instead of objects — which I found hard to translate into what I wanted. Then I looked at flocking… which was just a bit beyond my comprehension level… physics wise.
Then, I was describing to someone my predication, and he or she suggested particle systems. Forgive me for not remembering who… I was complaining a lot about this.
So I checked out examples for particle systems and also for collision detection… which proved immensely helpful! After breaking down how to use PVector and Arraylists instead of arrays (solving the having to reset the y position because adding new objects proved to be much easier with Arraylists)… I ended up creating exactly what I wanted. I’m still not in love with the accumulation, which I hope to iron out a bit tomorrow. I do have to say, thought, that being able to control the acceleration and velocity with PVector ended up not only letting me get a really natural snow effect, but also to have the “wind effect” when you clicked the mouse, which I am thrilled with. So…