Text border diriving me insane

Started by FortressCaulfield, Sun 14/07/2024 03:47:58

Previous topic - Next topic

FortressCaulfield

I'm making a 1280x800 game and the text border box refuses to be any wider than 160 pixels and looks like absolute garbage if it's got more than 3 words in it. Custom text window, default one, makes no difference.

There doesn't seem to be any sort of "max size" option I'm missing and all the tutorials I can find gloss over this entirely. Help! This is driving me crazy!
"I can hear you! My ears do more than excrete toxic mucus, you know!"

-Hall of Heroes Docent, Accrual Twist of Fate

Vincent

I think a workaround can be to have a custom GUI where you display your text? Maybe the size of the text border box have his size regardless what is your resolution but it's just a guess.

FortressCaulfield

Quote from: Vincent on Sun 14/07/2024 09:42:25I think a workaround can be to have a custom GUI where you display your text? Maybe the size of the text border box have his size regardless what is your resolution but it's just a guess.

Tried that. Same problem.
"I can hear you! My ears do more than excrete toxic mucus, you know!"

-Hall of Heroes Docent, Accrual Twist of Fate

Vincent

If you don't mind can you show a picture on how this is looking?

FortressCaulfield

#4
"I can hear you! My ears do more than excrete toxic mucus, you know!"

-Hall of Heroes Docent, Accrual Twist of Fate

Vincent

Are you using the "Think" function to display this text? Btw maybe you can add this on game start:

Code: ags
game.speech_bubble_width = 400;

FortressCaulfield

That did it! Thank you!

Why are so many useful tools like this buried where you can't find them? Why isn't this value on the gui editor or the options screen?

How did you even know about it? It's not even in the manual from what I can see.
"I can hear you! My ears do more than excrete toxic mucus, you know!"

-Hall of Heroes Docent, Accrual Twist of Fate

Vincent

That's cool! Btw you can find this in the manual by searching for: Game Variables. I might know this because I have been using ags for 11 years now. Regarding the other questions you might wait for someone like Crimson Wizard or some other dev.

Crimson Wizard

#8
If I start a new game from scratch, make it 1280x800, and then use Display command to display a very long text in a box, then it displays normally, occupying 2/3 of the screen width, with no extra setup from my side.
Same happens with a player.Say command, if I set Speech to "Sierra style" and provide a valid speech view to character.

The only case when this strange behavior that you described occurs is with Think command.
You should have mentioned your game setup and commands you are using in your question, because there may be nuances for some of them.


In the manual "Game variables" page contains a number of game-wide settings, not all of them are exposed in the editor, and may only be adjusted in script. I recommend scanning these in cases like this, to see if there's a setting that might affect the command you are using.

Character.Think page has a link to "game.speech_bubble_width" in the "See Also" category. Unfortunately, it does not mention this setting in a more explicit way.


Why these settings are not exposed in a more visible manner in the Editor: to put it simply, that's because AGS is an ancient engine, started in 1997, many things have been added in different times and layers, changing naming style and design; many things were not thought through at their times, as the engine was primarily purposed for 320x200 games, and have weird defaults or limitations all around it.

"Think" is a rather less used command, that likely was not complained much about, and therefore was never addressed for improval.
For instance, I did not remember that it has a bubble box limiting variable until checking this now.


On another hand, it is always possible to script your own text display using Overlays and GUIs for speech and other situations. Many people switch to scripting custom speech, because that lets to fine tune the behavior. This does not take much time to do for all your cases, and after that you don't have to rely on built-in commands with their hidden strangeness.

FortressCaulfield

#9
Thanks. Didn't occur to me that display and think would use different rules since they both appear to use the same gui. I don't use display at all so I hadn't been able to notice that display didn't have the same problem, so I spent an hour searching for issues related to display and the text border gui. And even if I'd have found that speech bubble value I'm not sure I'd have guessed it applied to think.

Not complaining, just wanted you to know that I do actually try to find stuff in the manual, despite all appearances :D

Thanks again to both of you!
"I can hear you! My ears do more than excrete toxic mucus, you know!"

-Hall of Heroes Docent, Accrual Twist of Fate

SMF spam blocked by CleanTalk