Tag Archives: nwn

Neverwinter Nights on Ubuntu 12.04 64bit with Nvidia

My NWN install doesn’t see as much action as it used to, but I’m still happy I can run it on my somewhat new install of Ubuntu 12.04 LTS 64bit.

  • I solved the too-much-black issue by “export MESA_EXTENSION_OVERRIDE=-GL_NV_vertex_program”
  • Solved the too-much-white issue by using the 310 experimental driver for my NVIDIA Quadro 2000M from the ubuntu-x-swat ppa
  • Solved the non-starting client by removing the package libtxc-dxtn-s2tc0

Given that, my nwn script looks like this:


# This script runs Neverwinter Nights from the current directory


# If you do not wish to use the SDL library included in the package, remove
# ./lib from LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=./miles:/usr/lib/i386-linux-gnu/mesa
export LD_LIBRARY_PATH=./miles:/usr/lib32/nvidia-experimental-310
export SDL_AUDIODRIVER=pulse
export MESA_EXTENSION_OVERRIDE=-GL_NV_vertex_program

./nwmain $@

Tagged , , ,

Neverwinter Nights in VirtualBox: My Settings

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:

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:

Initial Video Options

Initial Video Options

Initial Advanced Video Options

Initial Advanced Video Options

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:

Current Video Options

Current Video Options

Current Advanced Video Options

Current Advanced Video Options

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.

Tagged , , , ,

Thanks, VirtualBox, for OpenGL support

When an old friend of mine asked whether we wanted to try and play a bit of “Neverwinter Nights” again, I had accidentally just read that the game is available on Mac, too, and I embarked on an odyssey to get this to run.

Of course, I still had my whole old NWN Linux installation backed up. So I extracted that again. I imagined, I would just get the latest patch from Bioware, extract the Mac binaries, copy them over and be done with it. That, of course, would have been too easy. I did get the latest patch and extracted the Mac OSX apps. However, they wouldn’t run. Turned out, I needed some specific libraries from the MacSoft version of the game. The Mac game is no longer for sale, and quite contrary to prices for the PC versions, prices for used Mac versions are pretty high on ebay. So I found the old NWN Tech Demo on the Internet and copied the “Bink Carbon Library” to my NWN directory and the libraries in the miles/ directory to my miles/ directory. Lo and behold, the game would start, I was overjoyed … for a while.

A while later it turned out, the game did not run reliably. It took up the habit of crashing on me in the most inconvenient situations. I died a couple of times on both “Forgotten Realms Cormyr” and “World of Greyhawk” because the game crashed when I was almost done with some heavy fighting, myself almost spent, I then couldn’t get a connection again for an hour or more, and eventually got back right into the dungeon nearly dead with all the monsters respawned. No fun at all!

So before diving deeper into any action, I resolved to get a more stable gameplay experience. I tried researching the crash, but all the CrashReporter told me was that it was some sort of rosetta problem. I completely replaced rosetta with the original Leopard CD version. That, at first, seemed to help, but after a while I was getting the same crashes. Then I tried wine, with or without the NWN Wrapper off http://nwn.bioware.com . No luck there.

Finally, I thought, why not use VirtualBox? After all, VirtualBox does have OpenGL support. So, another attempt:

Install Linux on my recently updated VBox 3.0.8. I only had a gutsy CD ready, so I used that. Installation done, VirtualBox guest additions installed (with message about too old a kernel for DRI), glxgears showed smth., fire up nwn and … the complete VM crashed … wow!

So back we go to the VirtualBox documentation to find that OpenGL support requires kernel version 2.6.27. Gutsy’s way too old. I update to hardy, to intrepid, reinstall the guest additions and glxinfo shows OpenGL version 2. Try nwn again … the VM crashes again. That with the docs saying OpenGL has been tested on ubuntu 8.10 (though glxgears was a lot smoother, now.)

Before giving up completely, I upgraded to 9.04 without much hope. I reinstalled the guest additions again, for the sake of completeness fired up nwn, and … IT WORKS!!!

I’ll test this some more and come back with good settings.

Tagged , , , , , ,