Simple Rain Effect

This section is for people to post assets that people can use in their games. Everything here should have a creative commons or other open license, or be in the public domain.
Post Reply
Message
Author
User avatar
Sayumi101
Veteran
Posts: 219
Joined: Fri Apr 11, 2014 1:56 am
Completed: Closing Spaces, Pastel Rain, Straight Up: Sister-zoned!, Run 'N Gun
Projects: Hunta-H ~Romancing Idols~
Deviantart: Sayumi101
itch: sayumi101
Location: India
Contact:

Simple Rain Effect

#1 Post by Sayumi101 » Sun Mar 06, 2016 12:41 pm

So I was in the process of making a game for NaNoReNo and after a little help from code snippets found here on the forums and some free photoshop brushes was able to make an okay-ish rain and thunder effect.
And I thought I'd share just in case.
Preview (The thunder was kinda disappearing when I clicked screenshot ._.)
preview.png
Download
rain.zip
(724.29 KiB) Downloaded 460 times
Codes As written by a very kind user 'Alex' here---> http://lemmasoft.renai.us/forums/viewto ... f=8&t=7423

Code: Select all

init:
    image rev_lightning = im.Flip("lightning.png", horizontal=True)

    image rain:
  
        "rain1.png"
        0.2
        "rain3.png"
        0.2
        "rain2.png"
        0.2
        repeat
        
    image lightning:
        choice:        #weight of choice is 1
            "lightning.png"
            alpha  0.0
            0.5                 # show nothing for 0.5 seconds
        
        choice 0.1:   #weight of choice is 0.1
            "lightning.png"
            alpha  0.0
            linear 0.3 alpha  1.0
            linear 0.3 alpha  0.0
            
        choice 0.1:
            "rev_lightning"
            alpha  0.0
            linear 0.3 alpha  1.0
            linear 0.3 alpha  0.0
            
        repeat
Invoking the function in-game can be done by

Code: Select all

show lightning
show rain
Hope this was helpful a little at least >.<
ImageImageImage

User avatar
sugarsaw1
Newbie
Posts: 13
Joined: Wed Jul 22, 2015 7:30 pm
Location: U.S.
Contact:

Re: Simple Rain Effect

#2 Post by sugarsaw1 » Sun Mar 06, 2016 3:23 pm

That's really cool! The raindrops are pretty, too.

User avatar
Kokoro Hane
Eileen-Class Veteran
Posts: 1103
Joined: Thu Oct 27, 2011 6:51 pm
Completed: 30 Kilowatt Hours Left, The Only One Girl { First Quarter }, Crystal Captor: Memory Chronicle Finale, Journey of The Scroll, An Encounter ~In The Rain~, A Piece of Sweetness, Hot Scientific Clock, Since When Did I Have a Combat Butler?!, one. digit. off
Projects: Synchronized Clocks
Organization: Tofu Sheets Visual
Deviantart: kokoro-hane
itch: tofu-sheets-visual
Contact:

Re: Simple Rain Effect

#3 Post by Kokoro Hane » Wed Mar 09, 2016 3:20 pm

Hmm, this could be quite useful since there is a rain scene in mine!
PROJECTS:
Since When Did I Have a Combat Butler?![COMPLETE][NaNoRenO2020+]
Hot Scientific Clock [COMPLETE][BxG]
Journey of The Scroll [COMPLETE][RPG][v.2]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]
The Only One Girl [WiP][Up.5/20/2017][1stQ ver. released]

But dear God, You're the only North Star I would follow this far
Owl City "Galaxies"

User avatar
Sayumi101
Veteran
Posts: 219
Joined: Fri Apr 11, 2014 1:56 am
Completed: Closing Spaces, Pastel Rain, Straight Up: Sister-zoned!, Run 'N Gun
Projects: Hunta-H ~Romancing Idols~
Deviantart: Sayumi101
itch: sayumi101
Location: India
Contact:

Re: Simple Rain Effect

#4 Post by Sayumi101 » Sat Mar 19, 2016 1:59 am

sugarsaw1 wrote:...
Glad you like it ^^
Kokoro Hane wrote:...
Oh? Feel free to make use of it if it meets standards. >.<

-------------------
Just realized that I made it rain indoors in the preview pic...
Is bewildered by own idiocy.
-------------------
ImageImageImage

User avatar
YzzaPizzaIsCheezy
Regular
Posts: 64
Joined: Mon Feb 15, 2016 11:40 am
Completed: Best Friends
Projects: Sweet and Spices (NaNo'16)
Organization: Pastelle Studios, Classical Projects
Contact:

Re: Simple Rain Effect

#5 Post by YzzaPizzaIsCheezy » Sat Mar 19, 2016 3:13 am

Really like them. Gonna use them SOMEDAY. :)

TheSonicGeek
Newbie
Posts: 14
Joined: Wed Dec 03, 2014 12:20 pm
Tumblr: thesonicgeek
Deviantart: Doctoroctagonapus21
Contact:

Re: Simple Rain Effect

#6 Post by TheSonicGeek » Thu Apr 07, 2016 2:18 am

Yaay! I'm so glad i didn't need hire someone to do this :D Credit will be given

User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: Simple Rain Effect

#7 Post by 78909087 » Wed Jun 01, 2016 4:28 pm

This looks pretty! I'll give it a try.
I am not friends with the sun.
Image

ironk
Newbie
Posts: 10
Joined: Tue Oct 09, 2018 4:17 am
Contact:

Re: Simple Rain Effect

#8 Post by ironk » Tue Oct 09, 2018 4:20 am

renpy v7.1.0

pls help, it wont run :(
error: couldnt find rain.jpg
while lightning works

User avatar
parttimestorier
Veteran
Posts: 328
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN
Projects: DemiDato, The Light at the End of the Ocean
itch: janetitor
Location: Canada
Contact:

Re: Simple Rain Effect

#9 Post by parttimestorier » Tue Oct 09, 2018 10:40 am

ironk wrote:
Tue Oct 09, 2018 4:20 am
renpy v7.1.0

pls help, it wont run :(
error: couldnt find rain.jpg
while lightning works
If it's saying it can't find the file, then you're probably calling the file by the wrong name or putting it in the wrong place. The example says "rain.png", so if your code says "rain.jpg" that might be the issue. Also, if you put it somewhere other than the base game folder, you'll have to specify the location it's in as well. Like if you moved it to the images folder, it would be "images/rain.png", or if you made another folder just for the rain inside your images folder, it would be "images/rain/rain.png"
ImageImageImage

ironk
Newbie
Posts: 10
Joined: Tue Oct 09, 2018 4:17 am
Contact:

Re: Simple Rain Effect

#10 Post by ironk » Tue Oct 09, 2018 11:04 am

ok thanks

User avatar
ChangeOfHeart
Newbie
Posts: 6
Joined: Mon Dec 10, 2018 3:32 am
Projects: Fatal Night
Contact:

Re: Simple Rain Effect

#11 Post by ChangeOfHeart » Thu Dec 20, 2018 10:27 pm

Thanks! Definitely going to give this a try.

Post Reply

Who is online

Users browsing this forum: No registered users