supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Rainy levels are slow with opengl renderer

Open HybridDog opened this issue 5 years ago • 7 comments

SuperTux version: 0.6.1 System information: Lubuntu 18.04, intel gpu, 1920x1080 screen

Expected behavior

Rainy levels are not laggy

Actual behavior

In rainy levels (e.g. the Shocking level in the Forest world), I often get less than 30 FPS. If I decrease the window resolution, I get more FPS. This does not happen with the opengl20 or sdl renderer.

I've tried to find out why rain reduces the framerate. I changed the code so that the raindrops do not move. When the drops are drawn on the screen I have low FPS, and when I walked right so that the drops are not drawn, the framerate increases significantly.

Steps to reproduce actual behavior

Play the Shocking level.

HybridDog avatar Dec 26 '19 14:12 HybridDog

I've disabled raindrop collisions and rainsplashes, and set the new x position to always the same value. I still get about only 41 FPS. rain code changes: https://pastebin.com/raw/MLMntkYk

HybridDog avatar Jan 04 '20 15:01 HybridDog

... I recommend that you try disabling all addons that you can, except for whatever one you're using, then reboot the game... That seems to stop lag, apparently...

busybody42 avatar Feb 11 '20 23:02 busybody42

... I recommend that you try disabling all addons that you can, except for whatever one you're using, then reboot the game... That seems to stop lag, apparently...

I've temporarily renamed the addons folder in ~/.local/share/supertux2/ to disable all addons; it hasn't stopped the lag.

HybridDog avatar Feb 27 '20 14:02 HybridDog

@HybridDog Can you please confirm that this is still an issue? I doubt the situation has improved, but I might get to work on it if it still happens.

Semphriss avatar Jan 22 '21 05:01 Semphriss

Yes, I still get a low frame rate in these levels.

HybridDog avatar Jan 22 '21 18:01 HybridDog

When I play the Going Underground level, I get 38 FPS with the opengl renderer and 86 FPS with opengl20. In both cases I disabled vsync and enable redundant frame rendering. With opengl20 there are no reflections.

HybridDog avatar Feb 21 '21 12:02 HybridDog

@HybridDog Can you see whether the commit I pushed improves anything?

tobbi avatar Oct 16 '21 22:10 tobbi

I did not notice any more slowdowns recently. I'm therefore gonna close this.

tobbi avatar Jul 30 '23 14:07 tobbi

I could no longer reproduce this since I've switched to a newer operating system.

HybridDog avatar Jul 31 '23 15:07 HybridDog