Questions: Translucency and Game exiting

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
Alessio
Miko-Class Veteran
Posts: 576
Joined: Fri May 07, 2004 9:40 am
Completed: GO! Magical Boy (2006), Angelic Orbs (soundtrack)
Projects: Cyberlin (in progress)
Location: Finland
Contact:

Questions: Translucency and Game exiting

#1 Post by Alessio »

...And also some questions:

How do you define which part of a picture (PNG or other) is translucent and which is transparent? One example being the text box, which has transparent corners (making it look rounded) and a translucent body (the background picture shows through).

For development purposes, is it possible to define a "quick exit" from the game, e.g. by hitting ESC, so that I can quit the game without having to go ESC -> "Quit" -> "YES" (a bit tiring when testing continuously)?

Cheers!
Alessio

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

How do you define which part of a picture (PNG or other) is translucent and which is transparent? One example being the text box, which has transparent corners (making it look rounded) and a translucent body (the background picture shows through).
This is defined by the PNG, rather than by Ren'Py. If the PNG's alpha channel says that a pixel should be translucent or transparent, Ren'Py simply respects it.
For development purposes, is it possible to define a "quick exit" from the game, e.g. by hitting ESC, so that I can quit the game without having to go ESC -> "Quit" -> "YES" (a bit tiring when testing continuously)?
Right now, the easiest way to do this is to click the close box on the window twice, which will immediately exit the game (this is also useful if, for some reason, the gui quit fails.)

Alessio
Miko-Class Veteran
Posts: 576
Joined: Fri May 07, 2004 9:40 am
Completed: GO! Magical Boy (2006), Angelic Orbs (soundtrack)
Projects: Cyberlin (in progress)
Location: Finland
Contact:

#3 Post by Alessio »

Thanks, Tom! (And sorry for my ignorance about PNGs... :)

Wishful
Newbie
Posts: 15
Joined: Wed Apr 07, 2004 7:12 pm
Location: Behind you. Boo!
Contact:

Transparency in PNGs (I know I am a fool...)

#4 Post by Wishful »

So, ah... how does one go about making PNGs have a transparent background? I know it's to do with the image and not Ren'Py, but I don't know how you would change the properties of the image. @_@ Help?
~This random senselessness brought to you by Wishful~

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#5 Post by PyTom »

The process varies depending on what tool you use. In general, you want to use a tool that supports alpha channels on images. You simply draw something that is not fully opaque, and then save it as PNG.

If you let us know what tools you use, perhaps we can help more.

Wishful
Newbie
Posts: 15
Joined: Wed Apr 07, 2004 7:12 pm
Location: Behind you. Boo!
Contact:

#6 Post by Wishful »

Yeah... here's the problem: I really have no decent programs at all. I have Paint, and that's about it. -_- I'm going to have to track down some freeware or something...
~This random senselessness brought to you by Wishful~

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#7 Post by PyTom »

Yeah, paint is indecent. The programs I use are inkscape and the GIMP. You can get them from:

http://www.inkscape.org
http://www.gimp.org

Inkscape is a free SVG vector graphics editor, while the GIMP is a photoshop clone. Both are open source.

Wishful
Newbie
Posts: 15
Joined: Wed Apr 07, 2004 7:12 pm
Location: Behind you. Boo!
Contact:

#8 Post by Wishful »

Ah! Thank you! ^^
~This random senselessness brought to you by Wishful~

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Nozori_Games