Author Topic: Text Visibility Advice - Hard to read over detailed backgrounds  (Read 668 times)

Bavolis

  • Just past the Gnarled Scar.
    • Bavolis worked on a game that was nominated for an AGS Award!
Yes I'm still posting in beginner because I still consider myself a duct-tape and staples dev when it comes to anything more complex than the basics.

The problem:

I go nuts with tiny details in my backgrounds which makes the text extremely hard to read in some cases. Because my spoken language is gibberish, text comprehension is critical. Changing font and color is not doing it for me because some rooms will contrast well, but others still cause problems. I love the old Lucas style of text above the head and I have set up speech animations on the actual characters instead of the portrait style. I'm wondering if anybody has run into this problem before and how they solved it. My perfect world solution would be having the code always render a 50% transparent black box beneath the text that would shape itself to always fit the shape of the dialog.

I'm considering trying a font with a black block background, but I can see that causing a lot of weird problems in the long run.

Any ideas? Talk to me like I'm a zoo chimp when it comes to coding. :)

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
This is possible; for instance there's a speech bubble module available on a french AGS forum.
The downside is that one can no longer use built-in speech, which means dialog scripts like
Code: Adventure Game Studio
  1. roger: blah
  2. npc: blah
have to be turned into
Code: Adventure Game Studio
  1.  cRoger.S("blah");
  2.  cNpc.S("blah");

Here's the custom speech function used by that:
Code: Adventure Game Studio
  1. function S(this Character*, String message) {
  2.   // TODO: implement semi-transparent background
  3.   this.Say(message); // call actual AGS function for now
  4. }

This function can now do arbitrary things to display the text.

Bavolis

  • Just past the Gnarled Scar.
    • Bavolis worked on a game that was nominated for an AGS Award!
Thanks for the quick suggestions! I'm going to look into these. :)

So Phylactere (the french word balloon one) is *almost* perfect. It does exactly what I want display-wise and the game looks much more professional. In fact, I want to go back and rework the game to use this and ship with it. However, I've got one tricky stumbling block - it doesn't recognize the following format:

cOsirus.Say("&13 This line has an audio linked to it");

The &13 displays in the actual line rather than reading it as an audio file. Browsing/translating that French thread, they seem to have come up with a solution, but it's not working for me. One of the scripters suggested adding a specific code (posted below this paragraph) into the Phylactere definition and it seems to remove the &13 from the display, but it still doesn't play the audio. I thought maybe they were trying to simply have the line run as long as the length of the audio and put a cOSirus.Say("&13"); in front of the Phylactere line, but it waits for the audio to finish to move on, so that's not working. Obvious to say, I'm way out of my league here, but hopefully somebody has an idea what I'm doing wrong? I'm to the point where I'd be willing to drop the spoken audio and just go with the text because it makes the game much easier to understand.

Code: Adventure Game Studio
  1.  String voice = "";
  2.   if (str.StartsWith ("&")) {
  3.     int i = 1;
  4.     while (str.Chars [i]> = '0' && str.Chars [i] <= '9') i ++;
  5.    if (i> 1) {
  6.       voice = str.Substring (0, i);
  7.       str = str.Substring (i, str.Length-i);
  8.     }
  9.   }


Either way, thanks for the lead in the right direction. The core of my problem is solved here.
« Last Edit: 02 Dec 2017, 01:42 by Bavolis »

Bavolis

  • Just past the Gnarled Scar.
    • Bavolis worked on a game that was nominated for an AGS Award!
Experimenting with it a bit tonight, I can play a sound effect style file of the speech instead instead of the traditional one and then stop it before the next line, which works, but man the thought of doing that for 1000+ lines is a bit daunting.

Slasher

  • slasher
    • I can help with AGS tutoring
    •  
    • Lifetime Achievement Award Winner
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • Slasher worked on a game that was nominated for an AGS Award!
This is possible; for instance there's a speech bubble module available on a french AGS forum.
afaik someone has tweaked the Phylactere module to now accept speech...

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Oh, you just want a square background behind the text? I thought you meant like a strip of black for each line. Then that's pretty easy.

Phylactere has a problem with semi-transparent (black) backgrounds in 32-bit games, though. I've been working on a replacement module that works correctly in 32 bit. I was going to do a bit more work on it before the initial release, but I suppose I can put out a temp version. Stay tuned...

Bavolis

  • Just past the Gnarled Scar.
    • Bavolis worked on a game that was nominated for an AGS Award!
Definitely staying tuned. :)

The transparent background isn't as big of a deal as the sound files not playing. It looks pretty great even with a solid background in the bubbles. But yes, the transparency did have some weird neon pixel behavior with the artwork behind it.

Bavolis

  • Just past the Gnarled Scar.
    • Bavolis worked on a game that was nominated for an AGS Award!
afaik someone has tweaked the Phylactere module to now accept speech...

Do you remember reading that here? I found the main discussion thread which had the code I pasted above, but it doesn't seem to solve the problem.

Slasher

  • slasher
    • I can help with AGS tutoring
    •  
    • Lifetime Achievement Award Winner
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • Slasher worked on a game that was nominated for an AGS Award!
On the french site....

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  

Bavolis

  • Just past the Gnarled Scar.
    • Bavolis worked on a game that was nominated for an AGS Award!
This is working flawlessly for what I need - well done!

Now the only issue I have is a corrupt memory error with one room after my upgrade to 3.4. The oldest room that's gone through the most AGS upgrades, of course.