About GUI's transparency

Started by Baguettator, Mon 20/09/2021 12:01:28

Previous topic - Next topic

Baguettator

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

#1
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).

Baguettator

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 3.5.0.24".

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 !

Matti

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

Quote from: Baguettator on Mon 20/09/2021 13:08:02
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.

Baguettator

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 3.5.1.10

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.

Baguettator

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

#7
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.

Baguettator

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

How can I send you my game project ?

Crimson Wizard

Quote from: Baguettator on Mon 20/09/2021 14:49:38
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).

Baguettator


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.

Baguettator

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 3.5.0.24? I tried that and it also has error, although the "key" parameter in error is slightly different.

Baguettator

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

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

Baguettator

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...

Baguettator

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

Crimson Wizard

It was not running with 3.5.0.24 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.

Baguettator

Sad :(

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

SMF spam blocked by CleanTalk