Graphical overlays and portrait-style speech (SOLVED)

Started by paolo, Sun 20/12/2009 13:21:24

Previous topic - Next topic

paolo

I have a scene in my game in which I create multiple graphical overlays, and this code has always worked just fine up until recently. What has changed to cause a problem is that the backgrounds in my characters' speech portraits have coloured-in backgrounds, whereas they were transparent before. While any given portrait is being displayed, one of my overlays (it's hard to tell which one because I display, remove and reuse them rapidly and randomly) turns into a rectangle that is the same colour as the background of the portrait being displayed.

The simple solution would be to set the backgrounds of the portraits back to being transparent, but I don't want to do that. So, my questions are...

* Do portraits take up a graphical overlay? I suppose they must do.

* What is happening, exactly? Is one of overlays I am using somehow overlapping the portrait overlay in memory or something?

* Does the overlay used for portraits have a particular index (eg, overlay number 0) or does it just occupy the next available slot out of the maximum 20 overlays?

* If it uses the next free slot, how can I tell which overlay is being used for the portrait so that I can avoid using it for my own overlays?

and finally, the important one:

* How can I fix this problem without resorting to making the backgrounds of my characters' portraits transparent?

Adding an extra line to the top of my characters' portraits and setting the transparent colour to be the top left-hand pixel does not make any difference, presumably because it's a question of overlays being reused rather than which colour is transparent in the portraits.

I am using 18 graphical overlays as I know one is needed for speech overlays and I have another use for the remaining overlay. Reducing this number to 17 does not fix the problem either.

I'm using AGS v2.71 on Windows XP, and my game uses a true-colour palette.

Thanks for any help.

Pumaman

Can you upload something that demonstrates this problem?

paolo

#2
EDIT: I've made a cut-down version of the game that demonstrates the problem (this has now been deleted).

When you run the game, initially you'll see the rain overlay and other overlays on the ground, and everything is as it should be. After one second, the character speaks. One of the overlays on the ground turns into the top lefthand chunk of the character's portrait.

Thanks very much for your help.

Pumaman

Oh sorry, I didn't notice that you're using 2.71.
AGS 3.x has fixed a lot of bugs and issues, and AGS 2.x is no longer supported.

You might try upgrading to 2.72 as a low-risk move to see if the problem is fixed by that.

paolo

#4
Quote from: Pumaman on Sat 09/01/2010 17:35:41
You might try upgrading to 2.72 as a low-risk move to see if the problem is fixed by that.

OK, thanks. I'll try that and see whether it solves the problem.

EDIT: Yes, that fixes it. Thanks very much for your help!

SMF spam blocked by CleanTalk