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.














View as Feed
Grrr, blast that wordpress gallery … the NWN screenshots weren’t supposed to go up to the VBox images, but oh well.
What’s more interesting, though: Seems I might not have used the right keywords when researching my NWN crashes. It appears such crashes occur on multi-CPU/multi-core machines and the simple solution is to disable all but one core while playing. That’s worth another attempt, then. But first I need to DL the Xcode tools again, because I didn’t install CHUD.
By: Karl H. Beckers on October 19, 2009
at 12:57 pm
Thank you! Very informative and helpful. Have you tried running the toolset using VBox? I have been working with it for a few days, but I’m encountering some graphics issues.
By: David Barnes on October 20, 2009
at 5:48 am
Haven’t tried that. I have a version of the toolset that I used to run on Linux with wine somewhere, but that doesn’t just run on wine ootb. Installed dx9c through winetricks, but that doesn’t help much (dxdiag crashes, too). I’m trying with vc2005sp1 which is said to help for wow, but I don’t remember doing any of that when I was using it (not extensively) two years (or so) ago. From my startup script it seems I did compile wine from scratch at the time (and certainly not without a reason.)
I suppose you’re running windows?
By: Karl H. Beckers on October 20, 2009
at 1:30 pm
Btw., downloading vc2005sp1 I get a message saying it’s going to take 2d 48h !
What’s that? Is this a nice way of saying it’s going to take 4 days?
Oh well
By: Karl H. Beckers on October 20, 2009
at 1:31 pm
Guess I’ll stop that download … the toolset starts up on my native jaunty machine with wine on a fresh wineprefix. So whatever issues the jaunty in VBox has with it, is prolly not related to the installation. Since the VBox installation complains about opengl32.dll failing to register, I am inclined to believe that it’s something to do with the 3D support in VBox.
Because honestly, the toolset with wine is no fun, at all (graphics flash a lot, rotation doesn’t seem to work), I guess, the only remotely sensible config would be WinXP inside VBox … but that’s a whole new world of compatibility issues with the VBox 3D support that I have no idea about.
By: Karl H. Beckers on October 20, 2009
at 2:54 pm