Jump to content


Photo

Rain Drops - Dynamic rain with collisions

engine

  • Please log in to reply
15 replies to this topic

#1 tizzio

tizzio

    GMC Member

  • GMC Member
  • 276 posts
  • Version:GM:Studio

Posted 22 September 2014 - 11:47 AM

1411379176_slide.png?141137917


Dynamic rain with collisions
Link to marketplace(Please, give me feedback!)



> Features
  • Only 1 triangle for rain drop
  • Easy to use, only 2 objects (1parent object for collision and 1 object for the rain effect)
  • Optimized with a particle pool that reuses array indices
  • Fully customizable
  • You can draw your own water-drop texture
  • Rain sound effect and thunder included
>Demo 

Executable demonstration for windows (.exe)
 
https://drive.google...NXV3LTZmQXNUVWc
  
 

>Video
 

 
>Rain parameters



//horizontal rain range
rain_range = room_width/2;
//number of water drops (change it with rain_set_drop_count(count) )
rain_drops = 100;
rain_direction = 270;
rain_speed = 25;
rain_sound_volume = 1;
//size of the single rain drop
rain_size = 2;
//length of the single rain drop
rain_length = 3;

Edited by tizzio, 25 September 2014 - 09:26 AM.

  • 1

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#2 NotWhoYouThink

NotWhoYouThink

    GMC Member

  • GMC Member
  • 1061 posts
  • Version:Unknown

Posted 22 September 2014 - 11:57 AM

Nice, I just wouldn't put this up for money ;)


  • 1

This forum is archived. The above may not reflect my current opinion, or may be irrelevant now.


#3 Shadowrend

Shadowrend

    Master of Shadows

  • GMC Member
  • 3071 posts
  • Version:GM8

Posted 22 September 2014 - 12:18 PM

I would suggest putting in your FPS and doing several benchmarks (even with the overuse of this, having like 100 or 1000 times more drops then usual), alongside the machine info.

 

Other than that, there are some "collision" issues, but barely visible to the human eye.


Edited by Shadowrend, 22 September 2014 - 12:19 PM.

  • 0

#4 tizzio

tizzio

    GMC Member

  • GMC Member
  • 276 posts
  • Version:GM:Studio

Posted 22 September 2014 - 01:05 PM

I would suggest putting in your FPS and doing several benchmarks (even with the overuse of this, having like 100 or 1000 times more drops then usual), alongside the machine info.
 
Other than that, there are some "collision" issues, but barely visible to the human eye.


You can try the executable demo and increase the number of drops with Mouse Weel Up and Down

 

For the collision, i used the fastest method (collision_point), but you can use also collision_line to improve precision with less performances


Edited by tizzio, 22 September 2014 - 01:11 PM.

  • 1

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#5 tizzio

tizzio

    GMC Member

  • GMC Member
  • 276 posts
  • Version:GM:Studio

Posted 23 September 2014 - 06:49 AM

v1.0.2  Released (link)
  • Added "Precise collision checking" option
  • Added an option to enable more accurate collision[/url]
  • Added more comments to the code
  • Tidied up and reorganized resources
  • Improved the rain shape

Edited by tizzio, 23 September 2014 - 06:50 AM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#6 Lucky Duck

Lucky Duck

    GMC Member

  • Banned Users
  • 155 posts
  • Version:GM:Studio

Posted 24 September 2014 - 12:42 PM

Thanks for the update!

#7 dadio

dadio

    Potato King

  • YoYo Games Staff
  • 2740 posts
  • Version:GM:Studio

Posted 08 October 2014 - 11:24 AM

I posted this in the review for the effect but in case you missed it, any chance of adding this?:

 

Great effect, very easy to play with. I have a feature request! Could you please make it work with a "3/4 top down" view? (ie: Zelda Link To The Past view) So that the raindrops collisions would mostly just happen "randomly" around the screen (hitting the "ground")? & perhaps only 25% would collide with the tops of collidable objects? That would be really useful! Keep up the great work! (^-^)b


  • 0

AczgxAZ.png5aj9t5.jpg
 


#8 tizzio

tizzio

    GMC Member

  • GMC Member
  • 276 posts
  • Version:GM:Studio

Posted 08 October 2014 - 05:59 PM

I posted this in the review for the effect but in case you missed it, any chance of adding this?:

 

Great effect, very easy to play with. I have a feature request! Could you please make it work with a "3/4 top down" view? (ie: Zelda Link To The Past view) So that the raindrops collisions would mostly just happen "randomly" around the screen (hitting the "ground")? & perhaps only 25% would collide with the tops of collidable objects? That would be really useful! Keep up the great work! (^-^)b

 

Oh sure!, i'll add this feature

Thanks for the review


  • 1

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#9 SkyGuy

SkyGuy

    GMC Member

  • GMC Member
  • 72 posts
  • Version:GM:Studio

Posted 07 October 2015 - 11:12 PM

Can you send the sounds for sfx_wind, sfx_thunder and sfx_rain please? (maybe via email)

It would be great.

 

I have a question: I want to make raindrops appear randomly and disappear after a couple of minutes, like after one minute of the game for the level one, and after two minutes for the level 2...

Which values do I have to change and what I have to create exactly?

 

Thanks in advance, I'm still a beginner and I don't understand all the script.


  • 0

I'm looking for passionate people to make a team.

See my profile for further information.

mail: foyeric4@gmail.com skype: the_skyguy4


#10 tizzio

tizzio

    GMC Member

  • GMC Member
  • 276 posts
  • Version:GM:Studio

Posted 14 October 2015 - 09:11 PM

Can you send the sounds for sfx_wind, sfx_thunder and sfx_rain please? (maybe via email)

It would be great.

 

I have a question: I want to make raindrops appear randomly and disappear after a couple of minutes, like after one minute of the game for the level one, and after two minutes for the level 2...

Which values do I have to change and what I have to create exactly?

 

Thanks in advance, I'm still a beginner and I don't understand all the script.

Ok I'll update the asset package to fix the missing sounds

 

Hello,  you can create the obj_rain to start, and destroy it when you want to stop the rain.

Use an alarm to wait 2 minutes


Edited by tizzio, 14 October 2015 - 09:12 PM.

  • 0

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#11 Sammi3

Sammi3

    GMC Member

  • GMC Member
  • 246 posts
  • Version:GM:Studio

Posted 03 January 2016 - 08:52 AM

Just recently bought this. Very easy to implement. I would suggest that you have the rain drops fall more intermittently as if there is nothing to collide with, the effect loses it's value. But definitely worth every penny.

 

Here's a screen of it in my game:

Spoiler

  • 0

#12 tizzio

tizzio

    GMC Member

  • GMC Member
  • 276 posts
  • Version:GM:Studio

Posted 03 January 2016 - 03:13 PM

thanks for your post, i see in your gif that the speed of the rain is too high, so it passes through the terrain. To avoid a huge impact on fps it's not suggested to use a more precise collision.
if you want fast rain you can use
rain_collision_accurate = true;

  • 1

1411824224_medium.jpg?1411824224 1411379323_medium.jpg?1411379323  1438287288_medium.jpg?1438287288


#13 Sammi3

Sammi3

    GMC Member

  • GMC Member
  • 246 posts
  • Version:GM:Studio

Posted 03 January 2016 - 04:41 PM

Oh no, those were just tiles. I was just running it on a test map that didn't have that many actual objects compared to tiles. But I did end up slowing the speed of the rain though.

 

Here's a screen with everything working properly:

Spoiler

 

Thanks for the response.

 

But I really like the quality of this product. Saving up to buy the glare engine (student finances though). Does the glare engine use shaders?


Edited by Sammi3, 03 January 2016 - 07:25 PM.

  • 1

#14 Hulle

Hulle

    GMC Member

  • GMC Member
  • 27 posts
  • Version:GM:Studio

Posted 08 January 2016 - 10:03 AM

Bought it, looks great. Good job.

But sounds are missing. Version number 1.5.0.

 

Thanks in advance.


  • 0

#15 galladhan

galladhan

    GMC Member

  • GMC Member
  • 64 posts
  • Version:GM:Studio

Posted 09 January 2016 - 08:19 AM

Are you using the 1.4.1657 stable version, Hulle? If so, there's a issue with sounds downloaded with the assets. If you use one of the last beta updates, the issue has been solved. 


Edited by galladhan, 09 January 2016 - 08:19 AM.

  • 1

#16 FXokz

FXokz

    GMC Member

  • GMC Member
  • 531 posts
  • Version:GM:Studio

Posted 09 January 2016 - 08:30 PM

Wow i just checked out the demo.. thats pretty cool..


  • 1

________________________________________________________________________________

I dont know what to write in my signature <.<...........              ........ <.< lol






Also tagged with one or more of these keywords: engine