Open communist1917 opened 5 years ago
What hardware are you on? Also there is a command line option to change the renderer, try the two options.
opengl — very slow sdl — much faster
Can you post the output of glxinfo | grep "OpenGL version"
and glxinfo | grep Core
?
$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.3 (Compatibility Profile) Mesa 18.3.1
$ glxinfo | grep Core
OpenGL core profile version string: 4.3 (Core Profile) Mesa 18.3.1
What graphics card do you have?
NVIDIA Corporation GK208B [GeForce GT 730]
You probably need to use the official Nvidia driver, seems that reclocking support on that card is still WIP (see NVE0 on https://nouveau.freedesktop.org/wiki/PowerManagement/).
I have installed nouveau. Do you recommend to install proprietary video driver?
Maybe qwertychouskie meant the proprietary driver when he/she wrote "official".
Yes, sorry, that's what I meant. Unfortunately Nvidia cards and open drivers don't go well together.
I've tried to find out why rain reduces the framerate. I first thought that rain drop collision calculation is bad for performance, but when I disabled it, I still had low FPS. Then 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.
The raindrop drawing works like this in each frame: Firstly, for each particle the draw_surface function is called. https://github.com/SuperTux/supertux/blob/ff4eff8b10b5ad80962689d427555a8b497d95f5/src/object/particlesystem_interactive.cpp#L65-L67 This function enqueues the texture, position, etc. in the drawing requests queue. https://github.com/SuperTux/supertux/blob/ff4eff8b10b5ad80962689d427555a8b497d95f5/src/video/canvas.cpp#L136 Then the requests are sorted and the drops are drawn one by one with the draw_texture function. https://github.com/SuperTux/supertux/blob/ff4eff8b10b5ad80962689d427555a8b497d95f5/src/video/canvas.cpp#L54
The tower_of_ghosts.stl
level in the current ghost forest is so slow that I cannot play it: I get less than 10 fps.
In the Editor I noticed that this is caused by the lava tilemap.
@serano01, do you have the same problem?
tower_of_ghosts_slow.stl.zip
Weird, I do. This comes from the lava tilemap? Last time I played it, it worked.
After I have disabled the fire
property of the two lava body tiles id 1700
and id 1705
in tiles.strf
, I get a lot more frames per second.
In the code I noticed that a PulsingLight game object is added for every lava tile; disabling its draw function or reducing the window resolution did not increase the framerate, so the lag is not caused by rendering.
In this level, when the lava tilemap is not removed, there are ca. 2400 game objects (probably mostly PulsingLights); in another level there are only 240 game objects.
Maybe SuperTux is very slow when there are many game objects.
I can confirm that Tower of Ghosts is extremely slow in 0.6.1 beta 1. It's so slow it's almost unplayable. I estimate 5-10 FPS.
I noticed something is written into my console:
[WARNING] ~/supertux/src/supertux/sector.cpp:221 [/levels/world2/tower_of_ghosts.stl] Tried spawning Tux in solid matter. Compensating.
[WARNING] ~/supertux/src/supertux/sector.cpp:221 [/levels/world2/tower_of_ghosts.stl] Tried spawning Tux in solid matter. Compensating.
@Wuzzy2 The warning is unrelated. It occurs when the spawnpoint is directly next to solid matter. I already fixed it: #1288
I don't know if this is related: There seems to exist a bug with SDL_PollEvent(): https://stackoverflow.com/questions/53644628/sdl-pollevent-stuttering-while-idle (SDL_PollEvent in SuperTux)
I've improved the rain speed in the latest nightly. Please re-test.
Still having a problem on the latest:
supertux2 --version supertux2 v0.6.3
Try downloding a version from here: https://download.supertux.org/
That fixes it. By chance are you going to make a v0.6.4 so distros fix it earlier than 0.7.0?
Always, especially in levels with rain. OS: Manjaro Linux Supertux version: 0.6.0, installed from official repos.