Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: jetxl on Sun 06/06/2004 14:56:13

Title: Suggestion. TintScreenEx()
Post by: jetxl on Sun 06/06/2004 14:56:13
I was trying to make the background screen darker when the light goes off in the room. I only can change the RGB colors with TintScreen(R,B,G) and can't darken it. You can darken the characters with SetAmbientTint(R,G,B,sat,lum).

I could inport the same bg but darker in frame 2, but it would cost more memory that way. (and the bg's were made only using paint)

Is it possible and if yes, could it be possible that it doesn't effect the GUI?
Title: Re: Suggestion. TintScreenEx()
Post by: Edwin Xie on Sun 06/06/2004 23:17:01
Well...to darken using RGB is to decrease all three by the exact same number.
Title: Re: Suggestion. TintScreenEx()
Post by: Radiant on Mon 07/06/2004 10:43:00
Every color can be specified by RGB or by Hue/Sat/Int or by a variety of other methods (YHV I believe is common). I'm sure you can google the math somewhere, but RGB is the most straightforward of the three.
Oh, MS Paint can convert them, by the way. Just double-click on a color in the bottom.
Title: Re: Suggestion. TintScreenEx()
Post by: jetxl on Mon 07/06/2004 18:37:27
Quote from: Edwinxie on Sun 06/06/2004 23:17:01
Well...to darken using RGB is to decrease all three by the exact same number.
True, The screen becomes a bit dark.
But I'm thinking about an Indiana Jones and the Fate of Atlantis moment. Remember when you're in the dessert and walk into the dig-site where you have to get a generator working. The screen is dark but after a while the screen becomes lighter and lighter. Like your eyes ajust to the dark. It becomes easier to solve that puzzle.
Title: Re: Suggestion. TintScreenEx()
Post by: Pumaman on Mon 07/06/2004 21:29:24
TintScreen is slow, so I don't think an Ex() version would be very useful.

The best way to achieve what you want is to have 2 background frames in the room - one fully lit and one dark. Then, use RawDrawFrameTransparent to gradually fade in one over the other.