Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Egmundo Huevoz on Mon 15/01/2018 01:42:49

Title: [FOUND WORKAROUND] Need to make the font outline thicker in 1920x1080 resolution
Post by: Egmundo Huevoz on Mon 15/01/2018 01:42:49
Hi! I've scoured the forums for an answer, but there aren't any satisfactory ones. I'm currently using a TTF font, but I would settle for any type of font, really, as long as it's readable. Right now it's not unreadable, but it could cause problems. Thanks in advance.
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Snarky on Mon 15/01/2018 05:49:00
The lack of good support for this in AGS is the reason for this code (http://www.adventuregamestudio.co.uk/forums/index.php?topic=55544).

If you haven't used DrawingSurfaces it's probably a little tricky to make use of, but you can try the SpeechBubble module (http://www.adventuregamestudio.co.uk/forums/index.php?topic=55542) to see it in action. Set SpeechBubble.TextOutlineWidth to some value >1 to get a thicker outline.
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Egmundo Huevoz on Mon 15/01/2018 07:07:43
Hey Snarky, thanks for your response! I downloaded and "installed" your Speech bubble module, and it would solve my problem, but it doesn't work properly. Instead of showing my character's speech color, the letters are transparent (everything else it works as it should).

Also, if I weren't to use that module, and just wanted to use the outline code you provided, how would I do it? I don't even know where to paste that code, lol. (laugh)

Thanks in advance.
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Snarky on Mon 15/01/2018 08:27:56
Weird. Can you post a screenshot and your code that produces it?

As for just using the outline code without the module, as I said it's a little tricky, and it depends on exactly what you want it to do. For speech, I'd definitely recommend the module. For e.g. button text you'd need some code to take the button.Text property, create a dynamic sprite, draw the outline text to its drawing surface, and set the button graphic to the dynamic sprite. It gets complicated.

Edit: And if you're trying to put it on a label, I don't think you can.
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Egmundo Huevoz on Mon 15/01/2018 11:26:39
It's just the look and talk functions of my character. I tried changing the speech color to other colors, to no avail. The same goes with dialogs. :-\

Code (ags) Select
function cNacho_Look()
{
player.SayBubble ("I'm looking good!");}
}

function cNacho_Talk()
{
player.SayBubble ("As much as I'd enjoy talking to myself, I have better things to do with my time.");
}


(https://i.imgur.com/qPJFqTy.jpg)
(https://i.imgur.com/Xg5zNNV.jpg)

Thanks for your help!

Edit: btw, I'm using a 22 pt comic sans (the one that comes with Windows)
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Snarky on Mon 15/01/2018 12:47:24
Thanks! Could you also post your speech font and speech color settings, and SpeechBubble configuration?

Also, that white wedge that covers up some of the text in the second image, is there a reason for that or another bug?
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Matti on Mon 15/01/2018 13:14:24
Isn't that wedge just the cloud as seen in the first image?
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Snarky on Mon 15/01/2018 13:27:37
Duh, of course! :-[
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Egmundo Huevoz on Mon 15/01/2018 13:48:07
Quote from: Snarky on Mon 15/01/2018 12:47:24
Thanks! Could you also post your speech font and speech color settings, and SpeechBubble configuration?

Also, that white wedge that covers up some of the text in the second image, is there a reason for that or another bug?
Speech color: 184; 184; 248
Speech font: Comic Sans (the one that comes with Windows); 22pt
SpeechBubble config: the default. I installed the module and did nothing else.

Indeed, it's a cloud :-D
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Snarky on Mon 15/01/2018 14:13:17
Try a different speech color.
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Egmundo Huevoz on Mon 15/01/2018 16:44:34
Tried red, yellow, and black, to no avail. :X
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Snarky on Mon 15/01/2018 18:31:14
I've tried to replicate this problem, but it works fine for me.

Is your game 32-bit? If not, that would explain all sorts of weirdness. The SpeechBubble module does not support 16-bit color, and I'm not sure whether this method for drawing strings does either. I strongly recommend that you don't use 16-bit.

If that's not the problem, try sending me your project (download link in a PM), and I'll take a look at it.
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Egmundo Huevoz on Mon 15/01/2018 23:33:23
Actually, it seems to be the other way around. I tested it with a previous game, which was 16-bit, and it worked fine. Switched to 32-bit, and it became transparent.
Started a new test game with 32-bit right off the bat, and it worked fine. I downgraded to 16-bit, and both the text and the bubble's background changed to weird colors. Back to 32 and back to working fine.
My current game was 16-bit, and I recently changed it to 32-bit. Maybe that's the problem. Downgraded to 16-bit to test it out, and it isn't transparent anymore, just weird colors like in the test game:
(https://i.imgur.com/U5E5qqK.jpg)


I'm not comfortable sharing my entire game files, I hope you understand.
Title: Re: Need to make the font outline thicker in a 1920x1080 resolution
Post by: Egmundo Huevoz on Tue 16/01/2018 08:26:14
Snarky, I solved it!
Under "Visual" in game settings, for some reason I had backwards compatible mode activated in both GUI alpha rendering style and sprite alpha rendering style. Selected "Proper Alpha Blending" in both, and it works!

(nod)
Title: Re: [FOUND WORKAROUND] Need to make the font outline thicker in 1920x1080 resolution
Post by: Snarky on Tue 16/01/2018 12:47:46
Great! You're probably building your game on one of the templates that haven't been updated and come with outdated settings. That should really be fixed; ought to be a five-minute job.
Title: Re: [FOUND WORKAROUND] Need to make the font outline thicker in 1920x1080 resolution
Post by: Egmundo Huevoz on Wed 17/01/2018 10:03:02
I'm building my game on top of an older game of mine, that's why some of the things are outdated. But I fixed it now (laugh) Thanks for your help.