• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Depth In Rain.

H

Hyperion

Guest
Hello, I am slightly new to this so help would be greatly appreciated. I am trying to create a system where my Rain particles only show in the light around my character. I followed and learned how to make rain in general but would love if someone in this community could assist me in getting the rain to show some depth and appear behind the light and not in the whole darkness background.

Heres a screenshot of my game currently, If you have any further questions please do ask. Much appreciated.

 
E

ewlf5

Guest
Hello, I am slightly new to this so help would be greatly appreciated. I am trying to create a system where my Rain particles only show in the light around my character. I followed and learned how to make rain in general but would love if someone in this community could assist me in getting the rain to show some depth and appear behind the light and not in the whole darkness background.

Heres a screenshot of my game currently, If you have any further questions please do ask. Much appreciated.

Man, that's not the way of putting direct image links. But for depth, you can add faster and bigger raindrops which spawn more rare and smaller for foreground and slower ones which spawn faster for background. Also you can play with opacity - the further they are, less visible they are. The drops which are closest to the camera (the biggest and rarest ones) must be in front of the player.
 

obscene

Member
Probably the most versatile way is to use a surface effect which will help you later when you have multiple lights. It can be a pain to learn. Here's the idea...

1. Create 2 surfaces. One is for the rain effect. The other is a "mask" to simulate the darkness.
2. Fill your rain surface with black and then draw the rain on it.
3. Fill the mask with black and then redraw your lights on it as white.
4. Draw your mask on top of your rain surface using the subtract blend mode. (I think that's right).
5. Draw your rain surface on screen.

This might help
:
 
Top