AGS 4.0 - Alpha 24 for public test

Started by Crimson Wizard, Thu 01/06/2023 14:00:59

Previous topic - Next topic

Baguettator

Quote from: Crimson Wizard on Sun 07/09/2025 14:15:47In this case it should not be Click function, because it's not the "click" list box event, but "OnSelectionChanged".
The problem is not that there is no such function to be called directly, but because in AGS GUI controls are working inconsistently. In a normal ui framework a listbox control would trigger a event whenever its selection is changed by command too. In other words, when you set SelectionIndex, the listbox should call its "SelectionChanged" function.
That is what should be done here, not a click simulation.

I agree ! Also, having a On_Click Event, called before selection of the item, could be useful in some cases, if we have a On_Selection_Changed event too.

Another suggestion for listboxes : is it a good idea to allow using sprites for things like selected index, each item's background, listbox's background ? I know we can do that by script and using buttons or overlay, but perhaps it could be nicer if it's built-in ?

Crimson Wizard

#481
Quote from: Baguettator on Yesterday at 09:33:49Another suggestion for listboxes : is it a good idea to allow using sprites for things like selected index, each item's background, listbox's background ? I know we can do that by script and using buttons or overlay, but perhaps it could be nicer if it's built-in ?

There's a thread that I opened regarding the possible GUI overhaul:
https://www.adventuregamestudio.co.uk/forums/editor-development/gui-controls-update-proposal/

Please post your suggestions about GUI there.

The trouble here is that with all the suggestions posted here in this thread they are going to be lost in the many many pages of this thread. I already have a hard time of looking for the past suggestions up here. On another hand, people who are looking for the information on the latest update and issues with it will also have hard time to find such discussions.

This current forum thread is meant for a) announcing version updates, b) explaining how to work with it, and c) reporting their bugs.
As stated in the rules for this section:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/***-forum-rules-***-read-before-posting!-52436/
The new feature suggestions should go to "Engine/Editor Development" section.
Questions on scripting something normally go to "Beginner/Advanced Tech Support" section.

Pax Animo

Issue: Severe Performance Drop During Dialogue

Description
I'm creating a text-based game in AGS. The game has no sprites and doesn't use any "draw-to-surface" code. Everything compiles and runs smoothly under normal conditions.

However, when a dialogue starts via dDialogue.Start();, performance drops dramatically. The FPS counter (show_fps = true) does not appear on screen, but Task Manager shows the game's Power Usage jumping to Very High. Once the dialogue ends, performance returns to normal and Power Usage drops back to Low.

Steps to Reproduce

Run the game.

Start a dialogue with dDialogue.Start();.

Observe performance drop and high power usage.

End the dialogue.

Observe performance returning to normal.

Expected Result
Dialogue should run smoothly, with performance consistent with the rest of the game.

Actual Result
Dialogue causes a dramatic performance drop, with Task Manager showing high power usage. Ending the dialogue immediately restores smooth performance.

Environment

AGS Version: [4.0]

Operating System: [Win 10]

Renderer: [Direct3D / OpenGL / Software] I've tried all 3

CPU/GPU: [AMD 6300, GTX 970]
Misunderstood

Crimson Wizard

#483
Quote from: Pax Animo on Yesterday at 15:27:05Issue: Severe Performance Drop During Dialogue

Description
I'm creating a text-based game in AGS. The game has no sprites and doesn't use any "draw-to-surface" code. Everything compiles and runs smoothly under normal conditions.

However, when a dialogue starts via dDialogue.Start();, performance drops dramatically. The FPS counter (show_fps = true) does not appear on screen, but Task Manager shows the game's Power Usage jumping to Very High. Once the dialogue ends, performance returns to normal and Power Usage drops back to Low.


I do not observe this problem in common circumstances, that is if I make a new blank game from template, create a dialog with few options, and run it.

As usual, I would need more information in order to diagnose this problem.
First of all, please specify the full version (4-digit number) of AGS that you are using, just to be sure that we are trying the same one. This full version may be seen in Help->About dialog.

About FPS not shown, you mention you have a "show_fps = true" line, do you mean that you have it config file, have you added it yourself? It should be "show_fps = 1" instead, because engine does not parse "true" and "false" in config file.


Then, I am not sure what could be causing such behavior, so can only try few things.
1. Does it matter whether you run the game from the Editor or a game exe from Compiled/Windows folder?
2. Does the performance drop occur when dialog options are displayed, or when some of the options is run (that is - dialog script runs)?
3. How big is the dialog, how many options does it have?
4. Do you use standard dialog options, or scripted custom dialog options rendering?
5. You say that it's a text based game, what exactly is shown on screen when dialog is on? Are there any more visual elements shown when dialog is running, compared to when it's not running? Can you post a screenshot of your game?
6. Are there any scripts running while dialog is on? If yes, then what happens in them?

Pax Animo

#484
Quote from: Crimson Wizard on Yesterday at 18:22:42Then, I am not sure what could be causing such behavior, so can only try few things.
1. Does it matter whether you run the game from the Editor or a game exe from Compiled/Windows folder?
2. Does the performance drop occur when dialog options are displayed, or when some of the options is run (that is - dialog script runs)?
3. How big is the dialog, how many options does it have?
4. Do you use standard dialog options, or scripted custom dialog options rendering?
5. You say that it's a text based game, what exactly is shown on screen when dialog is on? Are there any more visual elements shown when dialog is running, compared to when it's not running? Can you post a screenshot of your game?
6. Are there any scripts running while dialog is on? If yes, then what happens in them?


AGS: AGS 4 - Alpha 24
Full release number: 4.0.0.20

I've set Display FPS on screen to True in Default Setup > Misc.

1: Compiled and tested—issue persists.

2: As soon as the dialogue options appear, they appear as soon as the dialogue starts.

3: Performance drops even with as few as 5 options.

4: Yes, No.

5: Only basic GUI elements (boxes/labels) are present—nothing complex that should cause this.

6: No other scripts or processes are running in the background. No scripts running in repeatedly_execute() or always_execute().

I'll sort out a screenshot soon, but the GUI is extremely basic.

This is all done via a clear template.


Misunderstood

Crimson Wizard

@Pax Animo Could you actually send me the compiled game, or the game project via PM? I have no definite ideas about what may be causing this, so being able to run the game itself will help me to understand.

Pax Animo

#486
I
Quote from: Crimson Wizard on Yesterday at 19:46:14@Pax Animo Could you actually send me the compiled game, or the game project via PM? I have no definite ideas about what may be causing this, so being able to run the game itself will help me to understand.

I'll send you the project file ASAP (probably tomorrow)

I should have mentioned a few more details and will do now-- The game res is 1920x1080 and I've added a new font file. with that file I've added new fonts and use different size multipliers for each font.
Misunderstood

Baguettator

Quote from: Crimson Wizard on Yesterday at 13:11:19
Quote from: Baguettator on Yesterday at 09:33:49Another suggestion for listboxes : is it a good idea to allow using sprites for things like selected index, each item's background, listbox's background ? I know we can do that by script and using buttons or overlay, but perhaps it could be nicer if it's built-in ?

There's a thread that I opened regarding the possible GUI overhaul:
https://www.adventuregamestudio.co.uk/forums/editor-development/gui-controls-update-proposal/

Please post your suggestions about GUI there.

The trouble here is that with all the suggestions posted here in this thread they are going to be lost in the many many pages of this thread. I already have a hard time of looking for the past suggestions up here. On another hand, people who are looking for the information on the latest update and issues with it will also have hard time to find such discussions.

This current forum thread is meant for a) announcing version updates, b) explaining how to work with it, and c) reporting their bugs.
As stated in the rules for this section:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/***-forum-rules-***-read-before-posting!-52436/
The new feature suggestions should go to "Engine/Editor Development" section.
Questions on scripting something normally go to "Beginner/Advanced Tech Support" section.


Oh sorry, I thought discussing futur features shoul be here. I will pay attention of that !

Pax Animo

Quote from: Crimson Wizard on Yesterday at 19:46:14@Pax Animo Could you actually send me the compiled game, or the game project via PM? I have no definite ideas about what may be causing this, so being able to run the game itself will help me to understand.

Sent.

I resolved the issue with the FPS not displaying, which revealed that the performance drop occurs as soon as the game loads and becomes more severe when a dialogue is triggered. As a test, I set all GUIs to not visible, which significantly improved FPS.
Misunderstood

SMF spam blocked by CleanTalk