Opened 3 years ago

Last modified 3 years ago

#12333 closed defect

AGS: Slowdown when in dialogue in rainy scenes — at Version 5

Reported by: Tea23 Owned by:
Priority: normal Component: Engine: AGS
Version: Keywords:
Cc: Game:

Description (last modified by Tea23)

When entering the dialogue selection in rainy scenes, such as at the start of the game with the Allen ghost, or in the midgame on the fire escape with Claude, the rain slows down and the mouse becomes jittery.

Also observed in Gemini Rue.

Change History (6)

comment:1 by criezy, 3 years ago

Could you try again with the latest changes I made? The optimisations I committed today mean ScummVM is using 30% less CPU in average with the few games I tried. The rainy scene with the Allen ghost at the start of Blackwell Convergence was already fine for me, but I was seeing some slowdown on the boat deck at the start of Blackwell Deception, and it is now playing at normal speed.

Note also that daily builds are not optimised, so we know that they will be slower than the release builds. Also if you compile ScummVM yourself, you can use the --enable-optimizations with configure to compile it with the optimisations normally used for release builds.

comment:2 by Tea23, 3 years ago

Just compiled with optimisations. There seems to be some improvement but there is still some noticeable slow down. I have attached a save game in a rainy scene, talk to the ghost and see if it happens to you as well. Save game was made with the updated Steam version.

by Tea23, 3 years ago

Attachment: blackwell3.001 added

comment:3 by criezy, 3 years ago

I have been testing with that same scene and I could not see any slowdown even before my changes.

One thing I noticed is that using your savegame the rain continues to fall when the dialog choices are displayed on screen. But when I start the game from the start, or load one of my save game the rains freezes during the dialog choices. If I use the original AGS interpreter I get exactly the same behaviour as in ScummVM (and the youtube videos I have watched also shows the same behaviour where the rain freezes during the dialog selection), so this does not appear to be a bug in ScummVM. As I am using the GOG version, a wild guess would be that this is controlled by a setting and that the new Steam version changed the value for that setting, and it gets saved in the savegames.

That being said, even with the rain still falling during the dialog choices (so when using your savegame) I still don't have any slowdown. And watching the CPU usage indicates it is not using any more CPU than when the rain is frozen. It is never using more than 40% of one core for me.

I am using the entry level M1 MacBook, so it is recent, but not particularly high spec (the graphics card is an integrated chip for example). And I am also using the OpenGL graphics mode.

I am not sure what you mean by "OpenGL renderer" though. In ScummVM only the software renderer is implemented in AGS so it will always use that (and then pass the fully composited image to the backend that may use OpenGL to draw the image on screen). So the ScummVM AGS engine itself is not using OpenGL to use hardware acceleration for example. As such the graphics card should have little impact (I would expect any graphics card to be able to blit an already composited image on screen very quickly). The CPU is more probably the bottleneck here. Are you maxing out one CPU when playing through that scene in ScummVM?

comment:4 by Tea23, 3 years ago

Will just summarise what we discussed on Discord regarding this:

With optimisations, we still get slowdown. FPS (measured using Steam overlay) halves in dialogue scenes but there's no spikes in CPU at all, and my beefy 3300X shouldn't really be getting hurt by such a thing anyway.

Also observed in Gemini Rue now we've worked around that. This is more noticeable since the rain is everywhere.

comment:5 by Tea23, 3 years ago

Description: modified (diff)
Summary: AGS: Blackwell Convergence (Steam, Win): Slowdown when in dialogue in rainy scenesAGS: Slowdown when in dialogue in rainy scenes
Note: See TracTickets for help on using tickets.