fheroes2 icon indicating copy to clipboard operation
fheroes2 copied to clipboard

Stop background color cycling to improve performance

Open drevoborod opened this issue 2 years ago • 5 comments

Preliminary checks

Describe the problem requiring a solution

When any dialogue window is open, background colour cycling is not being stopped. It leads to unnecessary resources consumption. Also, in the areas which are occupied by the shadow the cycling is being stopped, so part of background water under the shadow is stopped, and outside of the shadow water is moving. It looks weird.

https://github.com/ihhub/fheroes2/assets/10282847/82758218-50c9-4a6b-bd26-4c72093d6b14

Describe the possible solution

I suggest to stop background colour cycling when any dialogue is open.

Additional info

No response

drevoborod avatar Jul 23 '23 10:07 drevoborod

Hi, @drevoborod. I believe this how the original game behaves so we need to weigh this argument too.

On the other hand there is a disconnect between only colors cycling, like the sea, and no other objects animating.

zenseii avatar Jul 23 '23 13:07 zenseii

Hi @drevoborod , there could be monsters which require cycling animation such as Phoenix or Titans so we cannot simply stop animation for them.

ihhub avatar Jul 23 '23 13:07 ihhub

On the other hand there is a disconnect between only colors cycling, like the sea, and no other objects animating.

And the shadow, as I mentioned before. It's a little strange when a water under the shadow is not animated but all other water moves.

there could be monsters which require cycling animation such as Phoenix or Titans so we cannot simply stop animation for them.

That's why I'm talking about only background color cycling. Maybe there is a way to separate background and foreground cycling?

There is another example below which shows that the problem can be more noticeable in case of another dialogue windows and resolutions.

drevoborod avatar Jul 23 '23 14:07 drevoborod

https://github.com/ihhub/fheroes2/assets/10282847/5eaca21a-5eba-47ea-b8b0-aeb03bfcb923

drevoborod avatar Jul 23 '23 14:07 drevoborod

@drevoborod , yup, for some windows color cycling is not applicable. Also a valid point that other objects are not moving when water does. It is also true for volcanic terrain.

ihhub avatar Jul 26 '23 14:07 ihhub