Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Ali on Tue 20/02/2007 16:03:10

Title: Dialogue appears in the wrong place - Updated 09/03
Post by: Ali on Tue 20/02/2007 16:03:10
This is a problem I've had for a while: from time to time characters' dialogue appears in the wrong place. I'm using Lucas Arts style speech, and instead of appearing above characters' heads, the odd line will appear in the middle of the sprite. This happens more often if the character is near the edge of the screen and less often if I make the speech width wider, but it does still happen. I must stress that this only happens occasionally, not with every line.

I'm using a custom SCI font I made using Radiant Font edit. Could it be that my font has dimensions that AGS doesn't like? Any help would be appreciated.
Title: Re: Dialogue appears in the wrong place.
Post by: SSH on Tue 20/02/2007 16:14:24
Do you use script commands or the AGS dialog editor in general? If the former, you coudl try using my Hypertext module which does the lucasarts-style positioning of text all in script... if the same thing happens, then it will be easier to debug!
Title: Re: Dialogue appears in the wrong place.
Post by: Ali on Sat 24/02/2007 09:48:13
I'm afraid I'm using the standard AGS dialogue editor. I should have mentioned before that my game is at 640 x 480 resolution. I've never experienced this problem at lower resolution, but I think it may have happened with other fonts. I also don't think it ever happens outside of dialogues, but none of the characters it happens to say a great many things through script commands, so I'm uncertain.

Sorry to be so vague!
Title: Re: Dialogue appears in the wrong place.
Post by: Scorpiorus on Sat 24/02/2007 10:35:01
Quote from: Ali on Tue 20/02/2007 16:03:10This happens more often if the character is near the edge of the screen and less often if I make the speech width wider, but it does still happen.

By the way, how do you change the speech width?
Title: Re: Dialogue appears in the wrong place.
Post by: Ali on Sat 24/02/2007 10:40:21
It's a game.variable. I always find that section of the help file hardest to locate.
Title: Re: Dialogue appears in the wrong place.
Post by: Scorpiorus on Sat 24/02/2007 10:55:06
Why I'm asking is because there is currently no way to change a max width of the LucasArt-style speech (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=287).

If you mean game.speech_bubble_width, it's for the Character.Think() command.

On the other hand, Character.SayAt() command has a width as parameter to pass in, and it's possible to make it mess up the text position if the width is too narrow.


edited to reference the related tracker entry
Title: Re: Dialogue appears in the wrong place.
Post by: Ali on Sat 24/02/2007 11:26:04
Your evidence is compelling. I'm not on my home computer, so I can't check but I'm almost certain that the variable mentioned on that page:

game.max_speech_width

Is present in AGS 2.72 and sets speech width. I've changed it on a number of occasions and it alters the way regular LEC speech displays, not Thinks. Is it possible that the Tracker hasn't been updated?

I need to go and check if I'm talking nonsense.

EDIT: I am talking nonsense! I must have emperor's-new-clothes-ed myself into thinking I saw a change in the dialogue width when I changed that variable. That's a pity, I thought it would help solve the problem.
Title: Re: Dialogue appears in the wrong place.
Post by: Scorpiorus on Sun 25/02/2007 17:08:25
So are you definitely sure this happens with the speech from the dialog script, and it's not some custom Character.Say/SayAt call from the script (ex: in dialog_request) ?

Quote from: Ali on Tue 20/02/2007 16:03:10I must stress that this only happens occasionally, not with every line.

Hmm, so do you mean the very same speech message may display fine the other moment you try, while a talking character is standing at the same room coordinates?
Title: Re: Dialogue appears in the wrong place.
Post by: Ali on Sun 04/03/2007 12:09:47
Quote from: Scorpiorus on Sun 25/02/2007 17:08:25
So are you definitely sure this happens with the speech from the dialog script, and it's not some custom Character.Say/SayAt call from the script (ex: in dialog_request) ?

This definitely occurs with dialogue from the dialog script, written after this fashion: 'EGO: Hello!'. I haven't noticed it happen from any cEgo.Say style commands, but I'm not certain it doesn't/

Quote from: Scorpiorus on Sun 25/02/2007 17:08:25
Hmm, so do you mean the very same speech message may display fine the other moment you try, while a talking character is standing at the same room coordinates?

Yes. In fact if you choose the same dialogue option again, the line that appeared in the wrong place will often appear in the right place. This is what makes me think I'm not clever enough to work out the cause.

My game is very nearly complete, and this is the biggest outstanding 'bug'. Since it doesn't hamper gameplay, I guess I'll release the game as it is. When I do release the game, I'll also upload the font I used too, in case that's to blame in some way. I'll update this thread with a link at the appropriate time.

Thanks for your help.
Title: Re: Dialogue appears in the wrong place - Updated 09/03
Post by: Ali on Fri 09/03/2007 18:41:17
Sorry for the bump. This game has now been released:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=30440.0

Also, I'm now clear that this happens occasionally to both dialogue speech and speech using the cEgo.Say command.

The download includes the fonts I used as .SCI files. If anyone plays the game and thinks they might know what causes this problem, I'd appreciate any help.