Now that I’ve managed to get my copy of Neverwinter Nights to run in a VirtualBox VM (as detailed here), I wanted to make sure I got the most bang for my bucks, and played around a bit with a few tunables.
My VirtualBox settings depend a lot on my hardware, of course. In my case it’s a MacBook Pro with 4 GB of RAM. I initially started granting 2 GB to the VM and trying to measure how much is needed with vmstat while running the game. However, either there is a memory leak in nwmain or the way of measuring vmstat into a file leaks memory somehow (to HDD cache or some such). The measurement had only 400 MB of the 2 GB left after playing and quitting the game only freed up memory to a total of about 900 MB. However, setting the total available memory to 1 GB seems to work nicely. My settings are like these:
- Initial Video Options
- Initial Advanced Video Options
- Current Video Options
- Current Advanced Video Options
The first thing I do after starting the VM is turn off host integration for the mouse. While that generally works quite satisfactorily, with NWN, I can’t stand it. Because the SDL game tries to mess around with the mouse pointer at a lower level, moving the mouse out of the VM leaves the mouse pointer invisible. When you click on something rendered by the host (say an icon on the backdrop or a window), the mouse pointer becomes visible. If you, then, move back into the VM, you suddenly have two mouse pointers painted one over the other … rather distracting.
As far as settings in Neverwinter Nights itself are concerned, a resolution of 1400 x 1050 was what I was going for. One word of caution: “environment mapping on creatures” seriously messes up your display. I started with these settings:
Those settings worked well for a while. The only thing I noticed were some white polygons here and there, a couple of trees, some carpets, my Paladin mount, nothing terrible. But it turned out that I was quite lagged in situations where a large number of other characters were around. I was looking into my network connection, memory and storage load, but it, quite simply, turned out to be anti-aliasing. Turning that off removed any lag for me (that I couldn’t explain by a major download or some such.) It also doesn’t impact the look and feel so much IMHO. My current settings, thus, are:
I don’t use any of the SDL environment variables that I used to, anymore. The only thing that I changed in nwn is to remove the game provided SDL libraries from the library path to make it use the newer ones from jaunty. Not sure that makes much of a difference, though.
Anyway, I’m set. The game hasn’t crashed ever once in VirtualBox.