Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Knox on Fri 30/11/2012 21:06:57

Title: DrawString and alpha workaround? [SOLVED]
Post by: Knox on Fri 30/11/2012 21:06:57
Hi guys,

I was wondering: can a user make a custom font that uses "alpha sprites" instead of characters (A, B, C, etc)...and then use the DrawString function to draw transparent pink to dynamic sprites? The text you type would correspond to the various alpha sprites you placed in the font file.
Title: Re: DrawString and alpha workaround?
Post by: Khris on Sat 01/12/2012 15:11:06
You can't put alpha sprites on transparent parts of dynamic sprites, unfortunately. They get blended into "magic pink" if you try.
Calin's AlphaBlend plugin should solve this though.

The other thing is that no, you cannot use DrawString with sprites. You'd have to define which character is represented by which sprite first for instance, and there's no mechanism to do that. You have to do all the font rendering manually.
Title: Re: DrawString and alpha workaround?
Post by: Crimson Wizard on Sun 02/12/2012 00:56:19
There's Calin's SpriteFont plugin:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=44359.0
Can this one help?

E: hmm, there's actually your post in there :):
http://www.adventuregamestudio.co.uk/forums/index.php?topic=44359.msg592002#msg592002
Title: Re: DrawString and alpha workaround?
Post by: Knox on Sun 02/12/2012 02:56:18
lol, wow, must have been on high-grade quality acid! I honestly dont remember that plugin or post, heh. Cool, well uhh...yah I going to recheck that out now. So uhh...yah :)

thnx
Title: Re: DrawString and alpha workaround?
Post by: Knox on Mon 10/12/2012 19:24:01
By the way, I was able to modify a FONT.xx file and added custom alpha sprites (with no semi-transparency mind-you) instead of chars like "o", "p", "q", etc...then I use the DrawString function to "cut" with magic pink those sprites...it works well with what I wanted to do with the mower. Its fast too!