2.5.11

Water ripples

When I first started on this sketch, I had big plans of creating real water for the lower half of the screen. This has proven more difficult than I realised. I understand to a certain point how it is done, but then I have to take into consideration that I am not creating a water surface that we look straight down into. Instead, this surface has to disappear into the far distance and operate appropriately.

Second solution - create water ripples on the click of the mouse. These ripples must move towards the user and appear to disappear behind the boat. These ripples must get larger in time and weather the mouse is placed over the left half of the screen or the right half of the screen, the ripple shall move more in that direction as it appears closer and closer to the boat.

This appeared to work, but only in response to the press of the mouse. It would disappear as soon as the mouse button was released. This was very inappropriate and had to be changed.

Unfortunately I cannot move these newly coded ripples move towards the boat in sync with the movement of the ceiling and boat.

However, I have coded the ripples to be more transparent the further away the ripple is created and less transparent the closer they are to the boat.

Oh yeah! Another thing that came to mind was the state of the boat. This boat needed to change in some way according to the users input.
Now, when the mouse is moved closer and closer to the boat (the mouse is the torch), the boat appears to radiate the torch glow (orange). I used a black tint for the boat image when the torch was furtherest away from the boat, and a orange tint that became stronger as the mouse moved closer.

The last issue posing is lag!!
Why does my sketch work perfectly at home on processing and then as soon as it is loaded to openprocessing.org, it lags dramatically??? ARGH!

No comments:

Post a Comment