Civ4 BtS in VirtualBox 3.0 under Linux?

andreasb

No Jack Bauer GG? Really?
Joined
Jun 1, 2009
Messages
60
Location
Sweden
Has anyone tried to run BtS in the new VirtualBox (windows instance) with 3d support under Linux?
 
I haven't tried it. I don't think it will work because IIRC virtualbox doesn't support directX

Edit: I think it does work under Wine, someone made a thread about it.
 
It works under Wine (I use it), and the most important new feature of VirtualBox 3.0 is DirectX support. Furthermore, VirtualBox is sharing 3D code with Wine, so perhaps it will actually work. I haven't tried myself, but it would be nice to hear from someone who has investigated further.

Edit: I just tried, but BtS stops at "Init Engine" during startup with a "Invalid 3D device type". I tested some OpenGL apps that work well, with hardware accelerated graphics with reasonable framerates.

Followup: It seems that the DirectX 8 support is good, but that DirectX 9 often fails with similar error messages. I guess we'll have to wait for VirtualBox 3.1.
 
Edit: I just tried, but BtS stops at "Init Engine" during startup with a "Invalid 3D device type". I tested some OpenGL apps that work well, with hardware accelerated graphics with reasonable framerates.

Initially I got that too, and it's easy to fix, but the bad news is that it still doesn't work for me in that I can get it to run but it's not actually playable. It's a lot slower than via CrossOver/wine and 3D surfaces don't actually render correctly.

Since these remaining issues could be problems with or limitations of my host hardware (Macbook with embedded Nvidia graphics, oh btw.: I'm not on Linux for this, my Linux boxes have no graphical power at all except one that also has native Windows), I'm still going to write my experience with VBox 3.0.2/WinXP SP3 below. Assuming that DX9 is already installed in the VM.

  1. After upgrading to VirtualBox 3.0.2, I ran dxdiag (Start->Run->dxdiag) and checked in the Display panel. It said 3d acceleration was not available.
  2. I verified that 3d acceleration was actually enabled in VirtualBox (you need to shut down the VM for this. Check under "Display" in the main VBox window.)
  3. Because of this, I installed the guest additions again. There is a new check box that lets you install 3d drivers, and is by default disabled. I checked this box and installed. But dxdiag still denied the existence of 3d acceleration.
  4. It turns that the 3d driver setup wants to replace libraries that WinXP doesn't want to be overwritten. So I reboot Windows in Safe Mode, since the installer will actually be able to overwrite those DLLs for real in safe mode. Whacking F8 at boot didn't work for me in VBox, so I booted into normal and ran msconfig. In the boot.ini tab, you can check "/SAFEBOOT" and click Ok, and then restart and it will boot into safe mode. Now use the VBox menu item to install the guest additions again. Note that in safe mode, the installer won't run automatically. You have to open explorer and navigate to the simulated CD drive and run the installer manually.
  5. Note if you're concerned about overwriting system DLLs: The entire idea is wrapping D3D in OpenGL calls, via Wine3D libraries. That means D3D has to be replaced with the wrapper libs. There's no chance that you'll need the originals anytime soon though as native D3D isn't going to happen as far as I can tell, so it should be fine to do this in a VM.
  6. After this procedure, I checked dxdiag again and it finally acknowledged the presence of a 3d accelerating driver.
  7. Now, starting BtS in an 800x600 VM window got me an error about not being able to match the desired fullscreen resolution, and switching the VM to fullscreen (laptop display is only 1280x800, so no other options for me) just caused VBox to crash when I started BtS.
  8. Next I opened the CIV config file (there's a shortcut in the BtS folder) and configured CIV to ask about fullscreen on startup.
  9. Now running CIV in windowed mode in a fullscreened VM actually lets me start a game. It's not playable for me because no 3D surface seems to render (leader faces, and oh, the terrain, I actually do see some grey shadows of my units on a black background though). Also it of course complains about running on a system below minimum specs. Note that VBox predictably crashes if I change resolution after running BtS, regardless of whether I actually started a game or didn't even get to the main menu because of the "no matching fullscreen res" error.

That's where it ends for me, maybe someone with a bigger system could try? I have native Windows on my gaming PC, so I don't have a VBox image there I can just play with to test this. Meanwhile I'm going to enjoy BtS via CrossOver. Seems to be just too many problems with D3D in VBox 3.0.2.
 
Just installed Virtualbox 3.0.4 after reading the post by dannythefool. I upgraded the guest additions to 3.0.4 and then had to reinstall in safe mode to enable D3D acceleration.

Then I tried to increase the performance by using 16bit textures and setting all graphics options to Low detail. I also enabled skipping movies. I can run the game just fine, but it is dead slow. Playing is sort of like managing a server via RDP with a dial-up modem.

Good news is except the leader animations everything is rendering fine. There are no gray boxes etc...

I will try to improve game play by some tinkering.

My specs are:

Code:
Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_qfe.080814-1242)
System Manufacturer: innotek GmbH
System Model: VirtualBox
BIOS: Default System BIOS
Processor: AMD Phenom(tm) II X4 920 Processor,  MMX,  3DNow, ~2.8GHz
Memory: 1024MB RAM
Page File: 217MB used, 708MB available
Windows Dir: C:\WINDOWS
DirectX Version: DirectX 9.0c (4.09.0000.0904)

Host graphics is a onboard ATI Radeon HD 3200 Graphics with 756 MB shared memory.

I am open to suggestions on tinkering with Civ4 settings and Vbox settings to improve performance.

NanoteK
 
Well, this is worth registering. I yesterday installed WindowsXP as a guest OS under VirtualBox on my Macbook. Everything worked out like a charm following the procedure given by dannythefool.

I used VirtualBox 3.1.6 for OS X hosts and WindowsXP sp3. The leader heads look funny and I got problems with the movies but I disable them usually anyways. My Maxbook does not support the minimum resolution required though, that means that I miss a couple of pixel at the bottom. Well, some tweaking or a separate screen might solve this problem.

Given that my 10 year old Laptop didn't support 3D and my subsequent struggle with the back terrain problem (http://forums.civfanatics.com/showthread.php?t=134027) I'm pretty happy to finally enjoy the exploration part of Civ4. :)
 
Wine works by far better than Virtual Box 3 or VMWare 7.

I've tested the three following in linux (Debian)

Virtual Box 3.1.6:

No problems getting it running. Really slow though. Even when putting every setting to the lowest.

VMWare Workstation 7:

Slightly better then Virtual Box. But only slightly. At first the game was playable, but as soon as i met another
civilization it was just as slow as Virtual Box.


Wine 1.0.1:

Except for status bars on cities doesnt show progress, its an absolute breeze. This is with highest settings on graphics and 1680x1050 resolution.

Here is a guide that i followed to set it up: http://tombuntu.com/index.php/2007/10/24/civilization-iv-on-linux-updated-how-to/
 
Hello, I'm trying to make the above setup of running Civ4 in VirtualBox (my computer can easily run VBox) but I'm stuck at the start screen because it won't recognize the CD...
Any hint on what I can do?
*edit*
When I launch the game it actually checks my CD.
I never had problems with the CD itself on Windows and it installed just fine.

Thanks :)

By the way, someone should make a sticky out of this post.
 
Ok ok I apologize... the option was right before my eyes but I was a bit too much in a hurry...

There is in VirtualBox in the storage settings an option "Passthrough" that you must check in order to have the CD being recognized.
Otherwise I can say that the tutorial here above worked perfectly well on vbox 3.1.8

My results are that I can play it as smoothly as I used to on my previous laptop with WinXP.
My current config is an i7 processor with 4gb ram, 2gb dedicated to VirtualBox.
I have a 1Gb DDR3 graphic card. VBox only allows to dedicate 16Mb to the graphics but I believe that for the D3D they somehow work it around to the graphic card.

The only problem I've noticed so far is that the progress bars are absent from the town dispays.
No problems with leaderheads. And I play with Grid, Ressource and Yield turned on.

Thanks to Danny for his thorough answer, thanks to andreas for making a post title which clearly stated what it contained. And thanks to Civfanatics for being just so great :)
:thumbsup:
 
I use Windows 7 professional as a host for my Virtual Box.
The VB has Windows XP SP3. It works well except for the problems which were already reported regarding the dispay of the city production/food progress bars and some animations.
Except for that, it's working fine for me.

Which setup did you set for your display/graphics, how much ram?
Which problem do you precisely encounter?
 
Back
Top Bottom