Starcraft on VirtualBox (and Hamachi)

Rationale

Starcraft on Wine is horribly slow due to the missing DIB engine.

Handling DIBs is a crucial component when it comes to fast 2D drawing. Other games like Age of Empires and even applications like Adobe Photoshop are affected by this weakness in Wine.

Work on this has started last year as a Summer of Code program, but progress has slowed down recently.

All in all I guess we won’t get a usable implementation within the next few years except if another dedicated effort is spent on it.

Enter VirtualBox

Luckily another solution has come up recently: Sun’s VirtualBox virtualization product is free (as in beer and freedom), easy to use and works well enough with Starcraft.

Here’s my basic setup: VirtualBox 3.0.0 (in beta state right now but so far it hasn’t crashed on me) with guest additions, Windows XP and Starcraft Brood War 1.16.1.

I have enabled DirectDraw acceleration and bridging as network mode in VirtualBox. Both are simple point-and-click settings; you need to make sure the vboxnetflt module is loaded, though.

All of Starcraft is usable and very importantly fast.

Resolution issues

Update: You can just use VBoxSDL to start your VM in proper fullscreen mode without jumping through the hoops below. Makes it much more convenient and reliable.

VirtualBox does not have a real full-screen mode. With the guest additions you’re able to get a Desktop that resizes automatically to fit, but fixed resolutions (Starcraft uses 640×480) will not be scaled up to fill the VirtualBox window or the whole screen.

I have tried XRandR but it just made the viewport smaller which is worse than useless.

The kludge here is to copy over your X config, remove all resolutions except for 640×480 and start a new X server. I cannot go into the full detail here but it boils down to this:

xinit /home/sky/scripts/xinitrc.2 -display :1 \
  -- :1 -ac -config xorg.conf.lowres

Put in some lightweight window manager or VirtualBox itself at the end of xinitrc.2.

After that just use VirtualBox as you have before and switch to full screen.

You should be ready to get the full experience of playing Starcraft now!

Bonus: Hamachi integration

Hamachi is a proprietary cross-platform VPN solution that is also beginner-friendly and gratis. It works well with my VirtualBox setup, too.

However the latest version (1.0.3.0) does seem to have some problems with UDP networking.

Downgrading to 1.0.1.4 helped, and I was even able to play Starcraft via a VPN. Don’t forget to turn off the helpful Windows firewall least it might interfere with your network.

Did this post help you?

If yes, then I’d like to know about it. Please also tell me about other games that work or don’t work with this setup.

If you’re really happy about it you may also send me a gift.

Creating isometric buildings with Inkscape

Graphics and sound often are a major problem for free software games. But with the advancement of tools like Gimp or Inkscape this will definitely improve.

Add to it a bunch of good tutorials and the future looks bright: graphics artist Nicu has written an excellent one for isometric structures in Inkscape.