Here's one of my attempts...
http://www.openprocessing.org/sketch/63595
However with my code the way it was this proved difficult. I did learn some new things though in trying to do this. Such as using the brackets on voids to store variables, this came in handy when duplicating snowflakes as I could individually change each ones co-ordinates. I also learnt about the function pushMatrix and popMatrix which saves the previous co-ordinate positions (push) then reapplies them (pop). This was useful in combination with the rotate function as without it as I duplicated each snowflake it would apply the rotation around the previous snowflake, whilst with popMatrix it reapplied the previous co-ordinates so it spun in relation to its self.
However in the end I decided to redo my code as the way I had it was limiting and confused. So taking what I had learnt I rewrote it.
This is what I started with keeping it very simple, testing the latest thing I learnt putting variables in the brackets by the void...
New Beginning |
I also decided to change my snowflakes a little as well, they don't quite look as snowflake like anymore. I decided to have all the layers on at once however all stacked behind each other, unless the speed of the cursor(d) increases, when this happens the distance between them increases with the furtherest layer moving the greatest distance as a result.
Layer Setup |
my for loop code. |
'snowflakes' positioned along the screen |
In order to make it more fun and even more interacted I decided that if the cursor speed exceeds a given speed over a given time the background changes colour and the distance of the shapes from the centre point of the snowflake and between layers increases, this creates a different looking movement between the snowflakes. I have that this can happen twice, so I have three different levels, blue, green, and red, however if red is exceeded it 'explodes' ( the distance between layers continuously increases until all shapes are off the screen) and the screen flashes shades of red, but if you click it resets back to blue.
Another thing I made to encourage vigorous interaction with my application is if a new level is reached and the cursor speed drops below a certain speed for a given time it will default back to the blue level. I think this makes it more fun as you are rewarded for interacting while if you don't interact enough you are 'punished' in a way.
No comments:
Post a Comment