About GUI's transparency

Started by Baguettator, 20 Sep 2021, 12:01

« previous - next »


Does a Gui's transparency hit the FPS ? I mean, in my game, when a menu is appearing, I place a white 45% transparency GUI under it to have a cleaner view of the menu. When this GUI is here, I have the feeling that the game is laging. The mouse is not moving smoothly. Is it normal ?

Crimson Wizard

GUI updates were implemented in a very unoptimal way in AGS. This was improved in 3.5.1 to some degree (the latest 3.5.1 Patch 3 has another step of improvement).


Hmm, OK, I see !

Is it possible for me to update my AGS version ?

When I click on Help -> About AGS, it says "AGS build".

Is it possible for me to update it ? And how, please ? I hope so, but I don't want to lose all I have done so far !


You can download the version here, then open your project with it.

Quote from: Baguettator on 20 Sep 2021, 13:08
Is it possible for me to update it ? And how, please ? I hope so, but I don't want to lose all I have done so far !

You should always make backups, not only if you update your projects to new versions of AGS.


Thanks ! The problem is I downloaded the 3.5.1 version, loaded my game, saved it, tried to launch it but got a serious error :

Code: ags
Error: analyse de "\Well, I would have tried, but it's not great... It's the last time I'm going to do this kind of thing, I promise!\"" - Séquence d'échappement \W non reconnue.
Version: AGS

System.ArgumentException: analyse de "\Well, I would have tried, but it's not great... It's the last time I'm going to do this kind of thing, I promise!\"" - Séquence d'échappement \W non reconnue.
   à System.Text.RegularExpressions.RegexParser.ScanCharEscape()
   à System.Text.RegularExpressions.RegexParser.Unescape(String input)
   à System.Text.RegularExpressions.Regex.Unescape(String str)
   à AGS.Editor.Components.TranslationsComponent.CompileTranslation(Translation translation, CompileMessages errors)
   à AGS.Editor.Components.TranslationsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   à AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   à AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   à AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   à AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   à AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   à System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   à System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   à System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   à System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   à System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   à System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   à System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   à System.Windows.Forms.Control.WndProc(Message& m)
   à System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   à System.Windows.Forms.ToolStrip.WndProc(Message& m)
   à AGS.Editor.ToolStripExtended.WndProc(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

So I can't rebuild my game (made a back up before in case of).

Any idea ?

Crimson Wizard

You seem to have a typo in your translation, it shows you have "\W" sequence there. The backslash (\) is a special character that converts following char in a special way, for example \n is a linebreak. \W is not a correct sequence.

Maybe you meant something else there, or this backslash is there by mistake.

Judging by the \" in the end of the line, maybe you meant to have \" in the beginning as well.


Hmm ok I see, I corrected this in the translation file (was missing a ").

But the 3.5.1 can't launch my game though, there is an error at the game start :

Code: ags
Loading game failed with error : 
Script link failed
Runntime error : cannot resolve import , key = -1


Seems strange because I managed to launch the game with my backup with the 3.5.0.

Crimson Wizard

Please try doing Build -> Rebuild all files.

If that does not work, I'd like to see your game project, that would be easier to find what's wrong. I've never seen anyone getting that particular error before.


That's what I just did, it didn't work !!

How can I send you my game project ?

Crimson Wizard

Quote from: Baguettator on 20 Sep 2021, 14:49
How can I send you my game project ?

You may upload to any file hosting, such as dropbox, mediafire and so on, then PM me a link (I am not sharing the games with anyone but the engine developers if that's necessary).


Crimson Wizard

So far I found only that there's something wrong happening during compilation with "Fiche_Personnage" module. The running game errors in "Struct_Personnage" but maybe it's related to same error.

I will continue investigating.


Hmm, these two scripts are linked, so it won't be strange if the error is linked too.

I have really no idea of what is happenning... Good luck, and thanks a lot for your help !

Crimson Wizard

BTW, this is strange, you said your AGS is I tried that and it also has error, although the "key" parameter in error is slightly different.


Yes !

I don't know if the game I sent you is already "upgraded" to 3.5.1 or not. If you managed to open it with 3.5.0, so it should not be.

As far as I know, maybe this error occurs when I forget to delete an import of a variable, whereas I deleted the variable in the main script.

But I had a look for that kind of thing, but didn't see anything...

Have you seen anything else ?

Crimson Wizard

EDIT: ah, nevermind, I see you already have the if/else problem fixed. So this is something else.


Well, I'm sorry, but even if I change that, it doesn't work for me :(

Note that I already got this error, that's why I change to a new "if" for the number 75, and it works perfectly well.

No, the problem is elsewhere, and the key is still -1 in the error message...


This is very strange, because the game is running with, but not with the 3.5.1...!!

Crimson Wizard

It was not running with for me either.

Regarding if/else, so what I found is that you have to split if/else not at ID == 75, but at ID = 74. Then compiler works correctly. I am not certain why it stops working after 74 elses, not 75, and also why does not it report error earlier. Maybe some condition in compiler works incorrectly.

Unfortunately that does not fix the import error.


Sad :(

This kind of error message is not well known ? It doesn't mean something precise ?

SMF spam blocked by CleanTalk