Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TheJBurger on Mon 15/06/2009 04:31:25

Title: TintScreen() problem (Opacity + Repitition)
Post by: TheJBurger on Mon 15/06/2009 04:31:25
I've run into a problem using TintScreen(), in that it now covers the entire screen with a solid, opaque color instead of a transparent fill every time that it is called. It also repeats the top portion of the screen through the tint.

Here's a screenshot illustrating the problem:
(http://img193.imageshack.us/img193/1074/brtinterror1.png)

I use the command multiple times throughout my game for different effects, and it never used to have this problem, but now the problem affects every usage. My only guesses would be that it has something do with either ShakeScreen(), my game resolution, letterbox mode, or it's just that my monitor is doing something funky.

Any thoughts?
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: Gilbert on Mon 15/06/2009 04:49:26
If your capture shows also this oddity this would not be a problem with your monitor. My bet is that it may be related to ShakeScreen(), but if this is the case it's likely a bug in the engine, which should be fixed.

Which graphics driver is your game currently set to? D3D9 or DX5? Would it make a different if you change the game's setting from one of the driver to the other?
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: TheJBurger on Mon 15/06/2009 04:55:17
It's currently set to DX5. The game won't run on D3D9 (I don't think my graphics card supports it?).
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: Gilbert on Mon 15/06/2009 05:27:14
Well, I can confirm that there're some problems with tinting the screen and shaking it at the same time. When the screen is being shaken the engine actually grabs the whole screen and then paints it on top with several pixel displacement in every frame. The problem is, when the screen is grabbed it grabs the image with the tint already applied to it, and when it paint the on-top image it applies the tint once again. Worse of all, in subsequent frames it continue to apply the tint in every frame, so say if you tint the screen to red, it'll become more and more red during the shake.

I couldn't reproduce the repeated portion thingie at the moment, but it may be related to the letterbox problem as you mentioned.
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: TheJBurger on Mon 15/06/2009 05:32:31
Yes, I think it's related to ShakeScreen as well, but the problem is I'm not using ShakeScreen during this particular Tint command. In one instance during the game I do use them both simultaneously, but I don't see how that can affect all the other Tint commands in other portions of the game.
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: TheJBurger on Tue 16/06/2009 22:24:45
Bump for help please.

Also: I forgot to mention the one room I use ShakeScreen() with Tint also happens to be a vertical scrolling room. I don't know if that would have an effect on it.
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: Pumaman on Sun 21/06/2009 22:26:55
What resolution is the game? If you turn off letterbox mode does the problem still happen?

The TintScreen command is a bit experimental, you might be better off with a semi-transparent GUI to give you the same effect.
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: TheJBurger on Mon 22/06/2009 00:02:18
The resolution is 320x200. The problem occurs with and without letterbox mode, as well as with the resolution set at 320x240 (don't know if that's the same thing?).

I tried the workaround with the GUI and that works well. If the problem can't be fixed, this alternative would suffice.
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: Pumaman on Mon 22/06/2009 17:59:30
Ok thanks, I'll take a look at it after Mittens.
Title: Re: TintScreen() problem (Opacity + Repitition)
Post by: Pumaman on Sun 26/07/2009 15:19:18
Which version of AGS are you using? A bug with TintScreen was fixed in 3.1.2 SP1...