Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Trellian on Sat 22/08/2009 15:03:17

Title: Can views use sprites with alpha channels?
Post by: Trellian on Sat 22/08/2009 15:03:17
Hello, I am trying to create an animated character that uses sprites with alpha channels.  In this case, it is a simple red dot that fades partly transparent around the edges.  I have successfully imported the sprites and can see that the alpha channel loaded from the sprites view.  32-bit color is enabled.  I can place the sprite as an object, and the alpha channel is working.

However, when I create a view and place the sprite in the view, the alpha channel does not display.  The fully transparent parts of the sprite are transparent.  The partially transparent parts of the sprite show as solid.

Is it possible to use the alpha channels in the views or is this just a limitation of the game?

Thank you in advance.
Title: Re: Can views use sprites with alpha channels?
Post by: Matti on Sat 22/08/2009 15:49:39
Views can indeed have sprites with an alpha channel.

What do you mean with "the alpha channel does not display"? In the game or in the editor?
Title: Re: Can views use sprites with alpha channels?
Post by: Trellian on Sat 22/08/2009 15:55:09
Quote from: Mr Matti on Sat 22/08/2009 15:49:39
Views can indeed have sprites with an alpha channel.

What do you mean with "the alpha channel does not display"? In the game or in the editor?

Thank you so much for the quick reply.  My goal is to create a pulsing, glowing red dot.  I have several sprites with different levels of transparency loaded.  So, for example sprite #22 is mostly transparent around the edges and sprite 23 is more solid around the edges, but they are all solid red in the center.

When I look at the sprites in the Sprite window, they display correctly with the faded edges.  When I create a view and put the sprites in the view, the dots are solid red with no hint of partial transparency.  Every pixel in the view is either 100% transparent or 100% solid.  Nothing in between.
Title: Re: Can views use sprites with alpha channels?
Post by: Gilbert on Sat 22/08/2009 15:58:02
I remembered that the editor had problems that alpha channels won't display properly and I don't know whether this is fixed yet. So, test it in-game first and see if it works.
Title: Re: Can views use sprites with alpha channels?
Post by: Trellian on Sat 22/08/2009 16:00:27
Quote from: Mr Matti on Sat 22/08/2009 15:49:39
Views can indeed have sprites with an alpha channel.

What do you mean with "the alpha channel does not display"? In the game or in the editor?

Ahhh!  I just re-read your question and re-tested.  The problem is only in the View editor.  Within the game itself, it is doing exactly what I want.

Thank you so much!  That gives me exactly what I needed.