« January 2007 | Main | March 2007 »

February 14, 2007

A KotOR Valentine

Ages ago, I opened a bug with Apple about a performance problem with Knights of the Old Republic. In brief, on the outdoor Dantooine levels, performance would tank starting with 10.3.7 (it was fine with 10.3.6 and earlier). It was basically caused by KOTOR's unique use of dynamic VBOs, which somehow confounded OpenGL and killed performance starting with 10.3.7.

Anyway, we've had a workaround in place for ages - basically you disable VBOs in KOTOR and the Dantooine level runs faster -- the other levels are, of course, slower. It's not ideal, but it does work.

The bug I've had with Apple (4405051) has sat around for years now, and not much has happened -- until today, when I got an e-mail update. Apple recently updated my bug report with the following info:

Engineering has provided the following feedback regarding this issue:

Please reference the following link
http://support.aspyr.com/index.php?x=&mod_id=2&id=56

Also, in the Finder, a suggestion would be to go to your home folder, open the Library/Preferences/Knights of the Old Republic folder. Double click the 'swkotor.ini' file to edit it in TextEdit Scroll down to the section [Graphics Options], and add the line "Disable Vertex Buffer Objects=1" (without quotes) Save the swkotor.ini file and close it.

I don't know whether to laugh or cry.

And before the blog fills up with KOTOR questions, yes - it's still planned to be a Universal Binary. I've just wrapped up my latest project and am investigating replacement sound libraries for KOTOR (believe it or not, the main holdup all this time). We had investigated an OpenAL replacement, but KOTOR does some unusual things (like wrap mp3 files inside wav files) that made that very troublesome. Since I don't want to risk the wrath of any 3rd party sound library makers, I'll just say that I think we've got an Intel-native library that will finally do what KOTOR needs.