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: 233
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 »

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 968 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 »

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

User avatar
Kokoro Hane
Eileen-Class Veteran
Posts: 1236
Joined: Thu Oct 27, 2011 6:51 pm
Completed: 30 Kilowatt Hours Left, The Only One Girl { First Quarter }, An Encounter ~In The Rain~, A Piece of Sweetness, Since When Did I Have a Combat Butler?!, Piece by Piece, +many more
Projects: Fateful Encounter, Operation: Magic Hero
Organization: Tofu Sheets Visual
Deviantart: kokoro-hane
itch: tofu-sheets-visual
Contact:

Re: Simple Rain Effect

#3 Post by Kokoro Hane »

Hmm, this could be quite useful since there is a rain scene in mine!
PROJECTS:
Operation: Magic Hero [WiP]
Piece By Piece [COMPLETE][Spooktober VN '20]
RE/COUNT RE:VERSE [COMPLETE][RPG]
Since When Did I Have a Combat Butler?! [COMPLETE][NaNoRenO2020+]
Crystal Captor: Memory Chronicle Finale [COMPLETE][RPG][#1 in So Bad It's Good jam '17]

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

User avatar
Sayumi101
Veteran
Posts: 233
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 »

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 »

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 »

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 »

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 »

renpy v7.1.0

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

User avatar
parttimestorier
Veteran
Posts: 429
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: Simple Rain Effect

#9 Post by parttimestorier »

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 »

ok thanks

ChangeOfHeart
Newbie
Posts: 7
Joined: Mon Dec 10, 2018 3:32 am
Contact:

Re: Simple Rain Effect

#11 Post by ChangeOfHeart »

Thanks! Definitely going to give this a try.

Post Reply

Who is online

Users browsing this forum: No registered users