Retro gaming: Warcraft II on Ubuntu

Posted on 2010-11-18 22:58

Backstory: The kids have been using an old and relatively slow (Celeron) IBM Thinkpad R60e running Ubuntu 10.04. [update 130317: tested and working on 12.04] There have been a lot of configuration tweaks over the past year, including adding the Angerthas and Tengwar fonts for those all-important letters to friends in Dwarvish or Elvish. The installation of VLC so they can watch any Doctor Who ever made (I have them all in mp4 format). As for gaming, Tux Paint, Super Tux Kart, and Super Tux are perennial favorites, but Armagetron Advanced and various 2D puzzle games get alot of attention. The laptop also serves well for frequent visits to Webkinz (though the recent release of some kind of hamster critters at first didn't work in flash but used some proprietary plugin which didn't work in Linux. We got around this by running Windows in Virtualbox but what a hassle just for a 3D first-person marble madness maze game which sucked (they recently released a flash version but the kids quickly lost interest in it anyway).

This post is supposed to be about Warcraft! I was a big fan of Warcraft II when it first came out and used to have LAN parties all the time with friends to play it and the kids really wanted to play that. Running it inside Virtualbox was waaay too slow, and I couldn't get it to go full screen anyway. Also, I have another slow System76 meerkat (also underpowered) hooked up to the old TV with a VGA adapter (and also running Ubuntu 10.04) [now 12.04 as well] and the kids are obviously going to want to play against each other! Since this post was written in 2010 I've installed Ubuntu on my MacBook and set this up on there as well. Thankfully, installing Warcraft II in Ubuntu is pretty much a solved problem.

apt-get install wine did all the hard work to get wine installed. I decided to do away with the requirement for keeping the Warcraft II battlenet CD in the CD-Rom drive since the laptop was constantly spinning the CD up slowing everything down and generally making a racket, *and* I was planning on having a full install on each machine. I made an ISO image of the CD and stuck it in /media (I want to share it with all users on the machine). dd if=/dev/cdrom of=/media/WarII.iso I set ownership (since copying the file over to the other machine via samba assigned the file to the user nobody) and permissions on the ISO file (I don't know if thats important at all): sudo chown root /media/WarII.iso sudo chgrp root /media/WarII.iso sudo chmod 755 /media/WarII.iso I created a directory to mount the ISO also in media sudo mkdir /media/WarIImounted and made a change in the /etc/fstab on both machines so that the ISO would mount as a loopback device at boot time: /media/WarII.iso /media/WarIImounted iso9660 user, loop, ro 0 0 (I usually use vim for all my basic text editing needs, but I find myself slowly being assimilated by emacs largely thanks to org-mode). I told wine that the loopback device is my D drive since the game won't play without what it *thinks* is the CD inserted into what it *thinks* is a CD-Rom drive. cd ~/.wine/ ln -s /media/WarIImounted d: ln -s /media/WarII.iso d:: (note the single colon for the mounted ISO and double colons for the ISO image itself) then I installed Warcraft in wine: wine /media/WarIImounted/install.exe (taking default locations) The game set up perfectly, sound working and everything. Seems to run faster than in Virtualbox and works in full screen. To get the two machines networked, I installed IPX on both. I checked the network interfaces on both machines with ifconfig and decided to configure ipx on the laptop's LAN port instead of the wireless, ending up with "eth0" for both machines. sudo apt-get install ipx sudo modprobe ipx sudo ipx_interface add -p eth0 EtherII 0x12345678 (I used the same exact line on both machines) To check things are set up OK, in the terminal type: ifconfig and check that IPX is listed under the correct interface. You should see a line in the section for the interface you're using for internet connection that looks something like: IPX/Ethernet II addr:12345678:some numbers Its now a couple years later and trying to run this again and the machines are no longer on physical ethernet cables but over wireless. To get it to work I've had to change the interface to wlan0. If you've set it on the wrong one, you can just delete the route with (example): sudo ipx_interface del eth0 EtherII and re-issue the command with the desired interface in place of "eth0". note: the IPX setting is not persistent. You have to run the modprobe and interface-add lines each time you boot up. I guess I could easily write a script that runs at startup to set this at boot time, but we play so infrequently and I'd rather not have IPX running when I don't need it to be anyway. Then I ran the game on each, choosing Multiplayer Game, Enhanced, and chose to use IPX networking. I started a game on one machine, and viola! could soon connect and play against the player from the other. The information here is largely just duplication of what is posted on WineHQ here. This post was recently mentioned in a thread on