[FOUND WORKAROUND] Need to make the font outline thicker in 1920x1080 resolution

Started by Egmundo Huevoz, Mon 15/01/2018 01:42:49

Previous topic - Next topic

Egmundo Huevoz

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.

Snarky

The lack of good support for this in AGS is the reason for this code.

If you haven't used DrawingSurfaces it's probably a little tricky to make use of, but you can try the SpeechBubble module to see it in action. Set SpeechBubble.TextOutlineWidth to some value >1 to get a thicker outline.

Egmundo Huevoz

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.

Snarky

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.

Egmundo Huevoz

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
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.");
}





Thanks for your help!

Edit: btw, I'm using a 22 pt comic sans (the one that comes with Windows)

Snarky

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?

Matti

Isn't that wedge just the cloud as seen in the first image?

Snarky


Egmundo Huevoz

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

Snarky



Snarky

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.

Egmundo Huevoz

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:



I'm not comfortable sharing my entire game files, I hope you understand.

Egmundo Huevoz

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)

Snarky

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.

Egmundo Huevoz

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.

SMF spam blocked by CleanTalk