AGS 3.6.0 - Beta 15

Started by Crimson Wizard, Sun 20/03/2022 20:23:39

Previous topic - Next topic

Crimson Wizard

#220
Quote from: Baguettator on Mon 11/07/2022 06:31:41
And all the functions linked to a struct that is not created in the script (all the "standard" ones, like Button, GuiControl, ListBox etc...) don't appear in the list.

Are you speaking of standard AGS functions or the custom extenders linked to standard structs?
I will note just in case that the builtin functions should not be in this list on top, as this list is meant to jump to the code, and these functions are not in game script but in the engine.


Quote from: Baguettator on Mon 11/07/2022 06:31:41
Sorry, the font is Gorri Sans, the label parameters are standard, the thing is that probably I need to add a vertical offset to the font so the top of the letters won't be cut by the label top edge. But if I didn't choose the "cut content for Guicontrol" option in General Settings, that's not intended to be cut ?

The label is not supposed to cut anything without "clip contents", but my guess is that the font renderer may prevent anything from being drawn in negative relative coordinates (above and to the left from text's starting drawing position).

On the question why it is drawn too high, I quickly experimented with this font (downloaded it here), and noticed that it cuts a pixel or two from top if it has "TTF font adjustment" set to "Resize ascender...", but it seems fine if this option is set to "Do nothing". Is this the effect that you are experiencing?



Baguettator

I'm speaking about the custom extenders linked to standard structs !

QuoteThe label is not supposed to cut anything without "clip contents", but my guess is that the font renderer may prevent anything from being drawn in negative relative coordinates (above and to the left from text's starting drawing position).

On the question why it is drawn too high, I quickly experimented with this font (downloaded it here), and noticed that it cuts a pixel or two from top if it has "TTF font adjustment" set to "Resize ascender...", but it seems fine if this option is set to "Do nothing". Is this the effect that you are experiencing?

I think it cuts the negative positions.

I will test the "Do nothing" parameter, and I will let you know :)

Crimson Wizard

Probably fixed the extender functions not showing up in the list:
https://cirrus-ci.com/task/6733627856781312

Laura Hunt

#223
I'm having an issue with text properties apparently not saving their text encoding properly. I'll try to explain step by step as thoroughly as I can.

Context:
- I'm using AGS 3.6.0.30, Beta 10.
- My game is in ASCII/ANSI, and I've never switched it to Unicode.
- I'm not using translations. This is text written directly in the editor.
- All letters with accents display properly elsewhere in the game. I only have issues if they're in a custom text property string.

I have a name with an accent ("Lucía") in a text property whose value I define via an auxiliary script like this:

Code: ags
object[27].SetTextProperty(OBJ_ITEMNAME, "A photograph of Lucía.");


(OBJ_ITEMNAME is a constant whose value is "obj_itemname"; I always do this so that autocomplete will work for custom properties.)

When I start my game, Lucía is displayed as Luc?a.

However, if I delete the "í" and write it again, it is now displayed properly. I rebuild all files just to be sure, and save my game.

But when I start up AGS and run my game again, the issue is there again.


(Unrelated: I had the same issue as Baguettator with fonts being cut at the top of labels, and switching the TTF font adjustment value to "Do nothing" did indeed fix it.)

Crimson Wizard

#224
Quote from: Laura Hunt on Sun 17/07/2022 21:42:00
When I start my game, Lucía is displayed as Luc?a.

However, if I delete the "í" and write it again, it is now displayed properly. I rebuild all files just to be sure, and save my game.

But when I start up AGS and run my game again, the issue is there again.

Please tell, how do you display it precisely?

Does it display correctly in the editor, or it gets broken in both text editor and game?

Could it be that while in game you restore some previously made save, which has this property value stored in an incorrect way?

PS. I rather recommend switching to Unicode mode regardless, as that might resolve all text problems now and in the future.

greg

#225
Hi, I just upgraded to beta 10 (from beta 5).  When I look at my views in the editor, I see that many frames now have a frame-link sound "-1 [unknown]."  Previously, none of these frames had any frame-linked sound.

Here's a screenshot: https://drive.google.com/file/d/18GTGxBbdxTIg0ZFl4XgkqQ5Exk0T6LDo/view?usp=sharing.

When the affected views play, they don't interfere with other sounds that are playing or generate any error messages (either in AGS or in warnings.log).

Crimson Wizard

Quote from: greg on Mon 18/07/2022 00:30:07
Hi, I just upgraded to beta 10 (from beta 5).  When I look at my views in the editor, I see that many frames now have a frame-link sound "-1 [unknown]."  Previously, none of these frames had any frame-linked sound.

I recall there had been an incorrect frame sound ID problem quite long ago, much earlier than 3.6.0 betas. But I cannot think of any change between beta 5 and 10 that would affect frame sound ID property.

Do you still have a previous version of your game's project? It might be useful for testing this issue.

greg

QuoteDo you still have a previous version of your game's project? It might be useful for testing this issue.

Yes, I have the beta 5 version of the project.  When I load it in the beta 5 editor, though, I see that the frame-linked sound ID problem ("-1 [unknown]") is there as well.  So apparently the issue had already been there, but I didn't notice it until installing beta 10.

Crimson Wizard

@greg, I think this may be fixed by editing Game.agf in any text editor and doing "replace all":
what : <Sound>-1</Sound>
replace to: <Sound>0</Sound>

Laura Hunt

Quote from: Crimson Wizard on Sun 17/07/2022 22:51:24
Please tell, how do you display it precisely?

I've done some more testing, and it turns out it doesn't have to do specifically with custom text properties. Any extended characters in any non-room scripts will display the same issue.

So if I simply do player.Say("My name is Lucía"); in the Global Script, it will get displayed as "My name is Luc?a".

If I change anything in that script, even if it's just adding a commented line like //this is a comment, the issue is fixed temporarily untl the next time I open the engine.

As to your questions:

Quote from: Crimson Wizard on Sun 17/07/2022 22:51:24Does it display correctly in the editor, or it gets broken in both text editor and game?

It displays correctly in the editor. It's only broken in-game.

Quote from: Crimson Wizard on Sun 17/07/2022 22:51:24Could it be that while in game you restore some previously made save, which has this property value stored in an incorrect way?

There isn't a save system implemented yet, so every time the game runs, it runs from scratch. I'm not saving or loading anything.

Quote from: Crimson Wizard on Sun 17/07/2022 22:51:24PS. I rather recommend switching to Unicode mode regardless, as that might resolve all text problems now and in the future.

That's not really possible now, because I started working on this game with AGS 3.5.1 and all the fonts I'm using for this game use windows-1252 extended ASCII encoding. Changing fonts at this stage of the project is not really an option.

Crimson Wizard

Quote from: Laura Hunt on Mon 18/07/2022 04:16:07
I've done some more testing, and it turns out it doesn't have to do specifically with custom text properties. Any extended characters in any non-room scripts will display the same issue.

So if I simply do player.Say("My name is Lucía"); in the Global Script, it will get displayed as "My name is Luc?a".

If I change anything in that script, even if it's just adding a commented line like //this is a comment, the issue is fixed temporarily untl the next time I open the engine.

When you say "next time I open the engine", do you mean "editor"?

Overall, this sounds as the problem is in reading the scripts from the file and/or writing them back to file. As when compiling the game editor probably uses the scripts in memory if available, so when you edit the script, the version in memory gets fixed, but if they are not memory and loaded from the file - then a broken version is used.

So, two things should be tested: how the script is saved and how it's loaded. Can you open the script in a separate text editor and see what encoding is it saved in, and if the letter is correct there?

Additionally, do you use any editor plugins, or any extra tools, which may affect a script file?

Laura Hunt

Quote from: Crimson Wizard on Mon 18/07/2022 04:55:26
Quote from: Laura Hunt on Mon 18/07/2022 04:16:07
I've done some more testing, and it turns out it doesn't have to do specifically with custom text properties. Any extended characters in any non-room scripts will display the same issue.

So if I simply do player.Say("My name is Lucía"); in the Global Script, it will get displayed as "My name is Luc?a".

If I change anything in that script, even if it's just adding a commented line like //this is a comment, the issue is fixed temporarily untl the next time I open the engine.

When you say "next time I open the engine", do you mean "editor"?

Yes. I save my game, close AGS, I open AGS again, load my game, and the issue is back.

Quote from: Crimson Wizard on Mon 18/07/2022 04:55:26Overall, this sounds as the problem is in reading the scripts from the file and/or writing them back to file. As when compiling the game editor probably uses the scripts in memory if available, so when you edit the script, the version in memory gets fixed, but if they are not memory and loaded from the file - then a broken version is used.

The interesting thing is that if I switch to Unicode, the wrong character being displayed is ^, not ?. So it will display Luc^a rather than Luc?a. It's almost as if the engine is not able to render or access the extended ASCII characters after 127 for some reason, but only for those specific scripts. Room scripts work fine.

Quote from: Crimson Wizard on Mon 18/07/2022 04:55:26So, two things should be tested: how the script is saved and how it's loaded. Can you open the script in a separate text editor and see what encoding is it saved in, and if the letter is correct there?

Notepad++ confirms all the scripts are ANSI. Everything looks correct there.

Quote from: Crimson Wizard on Mon 18/07/2022 04:55:26Additionally, do you use any editor plugins, or any extra tools, which may affect a script file?

Nothing. No plugins or extras, just script modules (rellax, tween and my own auxiliary scripts).

Crimson Wizard

#232
Could you send me a script that causes the problems, and a font?
Also, what is the locale for non-unicode programs set on your system; and what locale is mentioned at the top of the Game.agf, where it sais "encoding"?


Quote from: Laura Hunt on Mon 18/07/2022 05:12:34
The interesting thing is that if I switch to Unicode, the wrong character being displayed is ^, not ?. So it will display Luc^a rather than Luc?a. It's almost as if the engine is not able to render or access the extended ASCII characters after 127 for some reason

This depends on whether the font has the character in a slot, which unicode index corresponds to that letter.

Laura Hunt

#233
Quote from: Crimson Wizard on Mon 18/07/2022 05:31:43
Could you send me a script that causes the problems, and a font?

I'll PM you the link in a second.

Quote from: Crimson Wizard on Mon 18/07/2022 05:31:43
Also, what is the locale for non-unicode programs set on your system;

English-US.

Quote from: Crimson Wizard on Mon 18/07/2022 05:31:43and what locale is mentioned at the top of the Game.agf, where it sais "encoding"?

Windows-1252.

Just to double check, I did a quick test importing the same fonts in a game made with AGS 3.5.1, and I don't seem to have any issues there.


Edit: I changed my system locale for non-unicode programs to Spanish just to check if the issue would still happen, and it didn't make a difference.

greg

Quote@greg, I think this may be fixed by editing Game.agf in any text editor and doing "replace all":
what : <Sound>-1</Sound>
replace to: <Sound>0</Sound>

Thank you, that resolved the issue!

Crimson Wizard



Crimson Wizard


Crimson Wizard

#238
[deleted]

Pax Animo

The download links are not working for me.
Misunderstood

SMF spam blocked by CleanTalk