legluondunet / MyLittleLutrisScripts

Lutris scripts for old games.
254 stars 42 forks source link

Star wars Kotor performace problems #80

Closed somebody1121 closed 3 years ago

somebody1121 commented 3 years ago

Hello, after installing and playing the begging i notice heavy performance drops. There are parts of the first level in witch performance can drop to around 20 fps. By setting in the swkotor.ini, in [Graphics Options], Disable Vertex Buffer Objects=0 (it's 1 by default) now i'm getting 60 fps. Also adding AllowSoftShadows=1, in the same section, enables the option to configure soft shadows and works correctly. Since you are modifying swkotor.ini with the script, I'm wondering if you could add this options in order to have a better experience out of the box.

legluondunet commented 3 years ago

Hello, I would like to reproduce your issue (fps drop) and verify if I need to change this options for me too and then for everyone. How could I reproduce it? From where part of the game fps begin to drop?

somebody1121 commented 3 years ago

It's on the start, on the first combat. It's most noticeable if you look in the direction of the ship front. I progress a little and now i am on Taris. After getting out of the first room i get

kotor_vertex_disable

If i use Disable Vertex Buffer Objects=0

kotor_vertex_enable

somebody1121 commented 3 years ago

Here the save file: 000002 - Game1.zip

Just decompress in /game/instalation/folder/saves

legluondunet commented 3 years ago

Hello, I finally found time to make a test. I used your save file without changed kotor config file. I have a nvidia GPU card so I used this variable to obtain fps: __GL_SHOW_GRAPHICS_OSD=1

ArcoLinux_2021-06-09_19-19-02

I played 5 mn and i obtained 60 fps during all my test, no drop:

ArcoLinux_2021-06-09_19-36-36

So I think this issue could be related to your hardware? What is your hardware specifications?

somebody1121 commented 3 years ago

I have a RX 580 an a R5 2600x, and on manjaro using the latest stable mesa drivers. The problem it's that the game with "Disable Vertex Buffer Objects = 1" became cpu bound. In my capture you can see that one core it's at 98% usage. With the option set to 0 the game runs at a constant 60 fps.

legluondunet commented 3 years ago

could be annoying for others players, look here: https://www.pcgamingwiki.com/wiki/Star_Wars:_Knights_of_the_Old_Republic#Lag_and_CTD

what if you let "Disable Vertex Buffer Objects = 1" option to default but disable v-sync?

V-Sync=0

somebody1121 commented 3 years ago

With vsync disable and Disable Vertex Buffer Objects = 1: Vsync_disable

Even with the game set to minimum: minimum

I even try "mesa_glthread = true": lutris_glthread glthread

With max settings, vsync disable and "Disable Vertex Buffer Objects = 0"

vsync_disable_and_vertex_buffers

legluondunet commented 3 years ago

Lutris script updated with "Disable Vertex Buffer Objects = 0". Thank you for your contribution.