[Scummvm-tracker] [ScummVM :: Bugs] #12333: AGS: Slowdown when in dialogue in rainy scenes
ScummVM :: Bugs
trac at scummvm.org
Sun Mar 28 21:55:30 UTC 2021
#12333: AGS: Slowdown when in dialogue in rainy scenes
-------------------+--------------------------
Reporter: Tea23 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: AGS
Version: | Resolution:
Keywords: | Game:
-------------------+--------------------------
Comment (by criezy):
It looks like this might be a regression in the original ags engine.
Today in the AGS Discord somebody reported that
[he] tested the new versions of AGS, and [he] noticed that when running
dialogues, the background loops (which are set to run during dialogs) now
slow down considerably.
The issue appears in AGS 3.5.1 and 3.6, but not in 3.5.0.
This was investigated by an AGS dev, and he found this:
I confirm the problem. I observe fps drop from 60 to 30 during dialog
options
which looks too round for a coincidence tbh...
[...]
Ah! of course. WaitForNextFrame() function is called twice, once from
UpdateGameOnce and second time from within DialogOptions::Run()
basically it waits twice per frame, so it's twice slower
yeah, removing one fixes it. Now I just need to carefuly investigate how
did it come to this, and whether removing one in DialogOptions::Run is
safe and wont break anything else. Also need to check similar cases in few
other game states.
Basically, if some game state calls UpdateGameOnce, then it should not
call WaitForNextFrame. OR, alternatively, we have to remove
WaitForNextFrame from UpdateGameOnce and call it alongside explicitly each
time
Once this is fixed in the ags repository, I will cherry-pick it in ScummVM
and you can test again. I am hopeful that what you reported is the same
issue and will thus be fixed.
I also learned that the AGS engine has an FPS counter. I will see if I can
add an option in ScummVM to allow the user to enable that. In the original
AGS you would use `--fps` on the command line when starting ags.
--
Ticket URL: <https://bugs.scummvm.org/ticket/12333#comment:6>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list