I've been working on a project that needs a way to draw rain. I've tried to use particles but the particle system doesn't seem to be made for "rain" particles or i am just bad.
My request: Could you guys tell me ways to simulate rain(without collision and or anything) just a way to draw rain particles? Thank you!
Making rain using Love2d
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Making rain using Love2d
You could cheat by using an image (a rain texture) with a mesh; each update, modifying the texture position, so it looks like it's falling; I'll create a demo thing in a jiffy
Edit: Attached. Press space to make it REAL intense, and escape exits (if you'd want to test it on android)
Edit2: Uploaded a new version, just to be sure, it checks both keycode and scancode for escape and space, maybe it will work for you now, Bobby
Edit: Attached. Press space to make it REAL intense, and escape exits (if you'd want to test it on android)
Edit2: Uploaded a new version, just to be sure, it checks both keycode and scancode for escape and space, maybe it will work for you now, Bobby
- Attachments
-
- raintest.love
- (278.17 KiB) Downloaded 629 times
Last edited by zorg on Fri Feb 19, 2016 5:22 pm, edited 1 time in total.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Making rain using Love2d
Hmm my back key on Android didn't do a thing. I wonder if it's working.
-
- Party member
- Posts: 125
- Joined: Wed Nov 26, 2014 6:43 am
Re: Making rain using Love2d
No i mean ingame rain that actually falls downnuno wrote:something like this?
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Making rain using Love2d
I take it my solution won't/didn't work for you then?Sosolol261 wrote:No i mean ingame rain that actually falls downnuno wrote:something like this?
Last edited by zorg on Sat Feb 20, 2016 11:57 am, edited 1 time in total.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Making rain using Love2d
it does fall down, did you see the video in full screen? low res doesnt show the rain properly (i'm not talking about the rain drops in the screen)Sosolol261 wrote:No i mean ingame rain that actually falls downnuno wrote:something like this?
-
- Party member
- Posts: 125
- Joined: Wed Nov 26, 2014 6:43 am
Re: Making rain using Love2d
Your solution is really close.. The reason i want to stick to the particles is that I could use a "wind" parameter to adjust the path of a rain drop mid-game and smooth.. does that make sense?zorg wrote:I take it my solution won't/didn't work for you then?Sosolol261 wrote:No i mean ingame rain that actually falls downnuno wrote:something like this?
-
- Party member
- Posts: 125
- Joined: Wed Nov 26, 2014 6:43 am
Re: Making rain using Love2d
Yes something like this would be greatnuno wrote:it does fall down, did you see the video in full screen? low res doesnt show the rain properly (i'm not talking about the rain drops in the screen)Sosolol261 wrote:No i mean ingame rain that actually falls downnuno wrote:something like this?
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Making rain using Love2d
If you look at my code, you'll see that if you press space, the game draws a second instance of the rain mesh, and it modifies the uv (texture) coordinates in such a way, that it will be acting like the wind is indeed modifying the angle with which it's falling. In your case, the wind parameter could be just the horizontal displacement value, and making that random (smoothed in a way) could definitely work imo.Sosolol261 wrote:Your solution is really close.. The reason i want to stick to the particles is that I could use a "wind" parameter to adjust the path of a rain drop mid-game and smooth.. does that make sense?zorg wrote:I take it my solution won't/didn't work for you then?Sosolol261 wrote:No i mean ingame rain that actually falls down
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 3 guests