Random Rain Effect (Java 2D Game Demo)
This is another stuff that I tested when I was developing Blue Boy Adventure.
Here's what I did:
When you're in the field, sometimes it starts to rain for a random duration (I used a Random class and picked a duration). The mechanics are actually quite simple. I prepared four "Rain" images and when it started to rain, I put a "dark filter" so the screen became darker and switched four images at a certain interval so it would look like an animation. I also implemented a sound transition system so the field music fades away when the rain starts and is replaced with the rain sound effect.
I liked how it turned out but the game became a bit slow when it was mixed with the night/lighting effect so I decided not to use this (it worked fine during daytime though)!