Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: prototyp3 on Sat 28/06/2003 23:26:53

Title: Suggestion - Alphas
Post by: prototyp3 on Sat 28/06/2003 23:26:53
I'm wondering if you're planning on adding higher than 1 bit alpha support in the future.  You've already started to add higher screen resolutions, I think the next step could be soft alphas.  It'd open up quite a few possibilities to making really sharp visuals.
Just curious.
Title: Re:Suggestion - Alphas
Post by: Scummbuddy on Sat 28/06/2003 23:33:39
if you import vector made backgrounds, id say those are pretty darn sharp.
Title: Re:Suggestion - Alphas
Post by: scotch on Sun 29/06/2003 00:13:40
sharp is probably the wrong word ;)

Yes it'd be extremely nice.. although I doubt it'll get added..
Mind you we have transparent characters and objects already so I suppose it wouldn't be too slow if used only when needed, I'm not sure.
For me, after the characters walking speed being scaled as well as the graphic this would be the second nicest feature to be added.  Seems hard though.
Title: Re:Suggestion - Alphas
Post by: prototyp3 on Sun 29/06/2003 01:14:55
I agree, sharp probably wasn't the best choice of words.  I should have just said something like "impressive visuals".  :]
Title: Re:Suggestion - Alphas
Post by: Pumaman on Sun 29/06/2003 16:52:46
I assume you're talking about alpha blending, where every pixel of an image has its own transparency value.

This would be a nice effect, but it only easily doable in 32-bit colour. With the 8- and 16-bit colour that AGS supports, it would be quite difficult to implement this, and I'm not sure it would be worth the hassle.
Title: Re:Suggestion - Alphas
Post by: TerranRich on Mon 30/06/2003 03:21:05
CJ, I don't remember if you've ever answered this or not, but is 32-bit color support possible in AGS? As it is, with 16-bit, the dithering is messy looking, and the other option in PSP, best-color, is just horrendous. I mean, it's only noticeable up close, but I think 32-bit color support would be the icing on the AGS cake. :)

Is it feasible?
Title: Re:Suggestion - Alphas
Post by: scotch on Mon 30/06/2003 18:34:32
16 bit is more than enough for any image I've ever made.. I can't say I've noticed there being any dithering in a 16 bit AGS game so far.. 32 bit colour would be awesome if it allowed alpha transparency though..
Title: Re:Suggestion - Alphas
Post by: Pumaman on Mon 30/06/2003 20:05:34
I've steered clear of 32-bit so far for speed reasons, because it's one of those things that everybody would tend to use because they can, and then moan about how slow the game was at 800x600x32. It's something I'll consider for AGS 2.6 though when the time comes.
Title: Re:Suggestion - Alphas
Post by: scotch on Mon 30/06/2003 20:08:39
Do like the forums, put a sensibility quiz on there if people choose 800x600x32 :)
Title: Re:Suggestion - Alphas
Post by: Pau on Mon 30/06/2003 23:35:00
I think alpha blending is interesting because charactersa can have soft borders and would be more integrated to the scene.

So combined with png (or other format that supports hi-color and trasparency) support can make easy to create characters with transparent regions and transparent-dithered borders.
Title: Re:Suggestion - Alphas
Post by: SSH on Tue 01/07/2003 11:25:44
Has anyone tried using a second character to do a level of transparency around their character? I mean, your second character is the semi-transparent bits of your main character, and has their transparency level set to half and then have

character[ALPHA].x=character[EGO].x;
character[ALPHA].y=character[EGO].y;

in your repeatedly_execute script?

Title: Re:Suggestion - Alphas
Post by: prototyp3 on Tue 01/07/2003 18:07:54
Besides characters, it'd also allow you to do some neat visuals.  For instance, grass or leaves in the foreground, partially obscuring your vision.  Glass effects.  Overall I think it could be neat.  Sure it could slow things down if overused and abused, but you guys will use it correctly.  ;]
Title: Re:Suggestion - Alphas
Post by: Archangel (aka SoupDragon) on Tue 01/07/2003 18:29:53
You'd have to add support for seperate shadow masks for idiots like me who don't know how to integrate an alpha layer into a bitmap.
Title: Re:Suggestion - Alphas
Post by: scotch on Tue 01/07/2003 18:39:28
You just use any program that supports it like PSP or PS.. and make the background transparent ._.

Or vector programs export things antialiased with alpha when you save as png usually.
Title: Re:Suggestion - Alphas
Post by: Archangel (aka SoupDragon) on Tue 01/07/2003 18:42:42
Aha, I just noticed the option in The GIMP to create an image with a transparent background instead of a white one. Okay, so no need for shadow maps after all :D
Title: Re:Suggestion - Alphas
Post by: Joseph DiPerla on Sun 06/07/2003 17:02:16
Hey Chris, most people will use a 16 bit editing program to make their bitmaps. I would be afraid of people making AGS 32 bit and leaving that option. Would it be possible to detect if any of the image files are actually 32 bit? If there not, then the engine could convert the game back into 16 bit.

If you goto www.cprogramming.com and look at the boards under game development, they will tell you how to make Allegro work faster with 32 bit graphics. Or maybe you could use the SDL Library for use with AGS just for 32 bit graphics cause I think its faster.

Just my two blue cups.

JD
Title: Re:Suggestion - Alphas
Post by: scotch on Sun 06/07/2003 17:21:15
I don't think anybody uses a 16 bit editing program..

In fact I don't know of one.  PS, PSP and GIMP etc edit in 32 bit colour, that's why colours get changed when you import into ags.

If you add it you could just have the option 16 or 32, and it'd get reduced to fit in 16 like it does now.
Title: Re:Suggestion - Alphas
Post by: Pumaman on Sun 06/07/2003 18:21:28
Yeah, all images are 32-bit. The only advantages 32-bit support would give AGS would be alpha channel support and smoother gradients. I am considering implementing it, but as I say it's something I'll leave till 2.6 as it will require quite a bit of work.
Title: Re:Suggestion - Alphas
Post by: Pau on Sat 12/07/2003 22:39:37
I've visited Allegro web page and I found it supports alpha blending with native support for TGA files (which would solve the alpha blending request).
So it wouldn't be too hard to implement (theorically). Is there any technical problem to implement it?
Title: Re:Suggestion - Alphas
Post by: Pumaman on Sat 12/07/2003 23:39:04
Allegro does support it, which is why it is possible to implement.

However, the AGS code makes certain assumptions about the colour depth; the file formats used internally currently only support 16-bit colour, and so forth. It's not as simple as just initializing a different graphics mode.