Jibble

Author Topic: [FOUND WORKAROUND] Need to make the font outline thicker in 1920x1080 resolution  (Read 1240 times)

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.
« Last Edit: 16 Jan 2018, 08:26 by Egmundo Huevoz »

Snarky

  • Global Moderator
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
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.

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

  • Global Moderator
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
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.
« Last Edit: 15 Jan 2018, 08:32 by Snarky »

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: Adventure Game Studio
  1. function cNacho_Look()
  2. {
  3. player.SayBubble ("I'm looking good!");}
  4. }
  5.  
  6. function cNacho_Talk()
  7. {
  8. player.SayBubble ("As much as I'd enjoy talking to myself, I have better things to do with my time.");
  9. }




Thanks for your help!

Edit: btw, I'm using a 22 pt comic sans (the one that comes with Windows)
« Last Edit: 15 Jan 2018, 11:49 by Egmundo Huevoz »

Snarky

  • Global Moderator
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
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

  • Global Moderator
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Duh, of course! :-[

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

  • Global Moderator
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Try a different speech color.

Tried red, yellow, and black, to no avail. :X

Snarky

  • Global Moderator
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
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.

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.

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

  • Global Moderator
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
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.

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.