Blinking screen effect

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

Blinking screen effect

#1 Post by Snowflower »

I knew the coding for this a long time ago, but I can't seem to find it anywhere now... :(

not the characters blinking but the kind where you'd use if the main character is going to sleep so the background images "blinks" couple times?

please and thank you <3
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

Iwako
Newbie
Posts: 19
Joined: Thu Mar 21, 2013 5:37 am
Contact:

Re: Blinking screen effect

#2 Post by Iwako »

Oh I was actually wondering about this too a few days ago. Uh, I'm pretty sure there should be some sort of fancy ATL code to do it, but I went for the boring method after a bit of googling and failure to find anything. >< I just made a few frames of the background in Photoshop with more and more parts blacked out, export all the frames as pics and define a new image for the blinking scene with pauses in between each frame.
Probably a bad method to do it, but works good enough for me xD If anyone got a proper code for this I'd like to know too! :D

User avatar
Rosstin
Veteran
Posts: 368
Joined: Mon Jan 31, 2011 5:43 pm
Completed: Rex Rocket, Kitty Love, King's Ascent
Projects: Road Redemption, Queen At Arms
Organization: Aqualuft Games
Contact:

Re: Blinking screen effect

#3 Post by Rosstin »

I definitely wouldn't do that! Haha!

I'll share with you guys once I implement it in Queen At Arms.
Image

User avatar
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

Re: Blinking screen effect

#4 Post by Snowflower »

I believe i had a simple code that was similar to "with fade" effect on coding.... but unfortunately i have terrible memory and the computer that i had my previous games on got stolen....
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

User avatar
Rosstin
Veteran
Posts: 368
Joined: Mon Jan 31, 2011 5:43 pm
Completed: Rex Rocket, Kitty Love, King's Ascent
Projects: Road Redemption, Queen At Arms
Organization: Aqualuft Games
Contact:

Re: Blinking screen effect

#5 Post by Rosstin »

I wonder if you would do some voodoo with parabolas and blackness or something. Hmm.

I guess I would probably just make some nice feathered-edge black images and close them over the screen. But if someone can think of a way to do it with math and ATL that would be superior I think.

Similar Q, not sure if resolved: http://lemmasoft.renai.us/forums/viewto ... =8&t=23300
Image

User avatar
Showsni
Miko-Class Veteran
Posts: 563
Joined: Tue Jul 24, 2007 12:58 pm
Contact:

Re: Blinking screen effect

#6 Post by Showsni »

You could just

show black with dissolve
hide black with dissolve

a few times for a rough approximation...

Something like

show black with dissolve
pause 0.1
hide black with dissolve
pause 0.2
show black with dissolve
pause 0.3
hide black with dissolve
pause 0.2
show black with dissolve
pause 1.0
hide black with dissolve
pause 0.2
show black with dissolve
pause 2.0
hide black with dissolve

maybe?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Blinking screen effect

#7 Post by Donmai »

You could use an ImageDissolve transition, using a simple image like the one I've attached to this post, with the same size of your game screen. That's how the "blinking eye" effec was created in KS.
http://www.renpy.org/wiki/renpy/doc/ref ... geDissolve
Use the 'reverse' parameter to give the illusion the "eye" of the narrator is closing or opening.

Code: Select all

define eyeopen = ImageDissolve("fx/eyeopen.png", 1.5, 100)
define eyeclose = ImageDissolve("fx/eyeopen.png", 1.5, 100, reverse=True)
The first number controls the time the transition takes to complete.
You can also see the transitions gallery in the Ren'Py tutorial game for some usage examples.
Attachments
eyeopen.png
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Iwako
Newbie
Posts: 19
Joined: Thu Mar 21, 2013 5:37 am
Contact:

Re: Blinking screen effect

#8 Post by Iwako »

Donmai wrote:You could use an ImageDissolve transition, using a simple image like the one I've attached to this post, with the same size of your game screen. That's how the "blinking eye" effec was created in KS.
http://www.renpy.org/wiki/renpy/doc/ref ... geDissolve
Use the 'reverse' parameter to give the illusion the "eye" of the narrator is closing or opening.

Code: Select all

define eyeopen = ImageDissolve("fx/eyeopen.png", 1.5, 100)
define eyeclose = ImageDissolve("fx/eyeopen.png", 1.5, 100, reverse=True)
The first number controls the time the transition takes to complete.
You can also see the transitions gallery in the Ren'Py tutorial game for some usage examples.
Just tried this one and it works like a gem! Thanks!

(@OP: Sorry for thread hijacking xD)

User avatar
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

Re: Blinking screen effect

#9 Post by Snowflower »

Hmmm... that wasn't what I've used before, but this will do
thank you for everyone that contributed :3
&thanks donmai :D
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

User avatar
Rosstin2
Veteran
Posts: 253
Joined: Thu Jan 09, 2014 12:42 pm
Completed: King's Ascent, Kitty Love
Projects: Queen At Arms, Rex Rocket
Organization: Aqualuft Games
Contact:

Re: Blinking screen effect

#10 Post by Rosstin2 »

Necro. I'm still interested in a better solution, something that's pure math would be brilliant.
Image

ThicBit
Newbie
Posts: 5
Joined: Mon May 09, 2022 10:27 pm
Contact:

Re: Blinking screen effect

#11 Post by ThicBit »

Would it be okay if I used this code and the image in my game????

Post Reply

Who is online

Users browsing this forum: No registered users