Tint the screen without im.matrix.tint?

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
Destiny
Veteran
Posts: 468
Joined: Thu Jun 14, 2012 2:00 pm
Projects: Cards of Destiny, Sky Eye
Location: Germany
Contact:

Tint the screen without im.matrix.tint?

#1 Post by Destiny »

Hello

I came to a small problem here.
Pretty much all backgrounds in my game are image maps and most maps have a light switch.
I would love to have the player be able to switch the light on and off by clicking on the switch.

I tried putting a transparent blue layer on it, but since it seems to be impossible to somehow make a layer in Ren'Py additional or multiply (like Photoshop), it looks just greyish and dull.
Tinting the backgrounds by hand or im.matrix.tint also seems impossible, because I am already at 25 background images now and I only have finished four rooms (of presumably 21). It would increase the size of the graphics folder OR it would probably slow down the engine that needs to make a dark copy of all the images.

So my question would be, if there is maybe a command that would put tint over the whole screen (figures, background, etc).
No idea, something like $ color = darkblue or show tint on multiply or whatever.
If it would be one command that only needs to be put at the end of the light switch hotspot commands would make it so much easier.


But going through the Ren'Py cookbook, Tutorial and so on didn't help me.
I found out about user_layer, but not about how to actual do something with it. I found the im.matrix.tint, but - like I said - that would be extreme to tint hundred pictures by it (not to mention that it will surely eat my nerves to put every single image into that code).


Thanks in advance!
Image
Cards of Destiny (WIP) / Sky Eye (WIP)

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Tint the screen without im.matrix.tint?

#2 Post by Asceai »

im.matrix.tint is the way to do it. ren'py is a programming environment - I'm sure you can work out some way to automate it for your situation.

However, in answer to your question, you can use a transparent blue layer with additive blending. It won't look right with software rendering but other than that it could be what you want.

Code: Select all

image bluetint:
  Solid("#00F")
  alpha 0.1
  additive 1.0

Code: Select all

show bluetint

User avatar
Destiny
Veteran
Posts: 468
Joined: Thu Jun 14, 2012 2:00 pm
Projects: Cards of Destiny, Sky Eye
Location: Germany
Contact:

Re: Tint the screen without im.matrix.tint?

#3 Post by Destiny »

Asceai wrote:However, in answer to your question, you can use a transparent blue layer with additive blending. It won't look right with software rendering but other than that it could be what you want.
Well, that is more the opposite of what I want (it makes the screen brighter instead of darker) xD"

Guess, I have to see that matrix.tint then.
Yay for having to juggle with even more pics then, I guess :'D
Image
Cards of Destiny (WIP) / Sky Eye (WIP)

Post Reply

Who is online

Users browsing this forum: Dark79, Majestic-12 [Bot]