May 28, 2009

Update (2016): I am keeping this for historical reasons, but for sure these days it’s easier to run a VM on a Mac. Also, check out the officail WINE project support page (of which I am no longer a ‘moderator’) – in all likelihood I cannot help you pew pew pew on your shiney new Mac. But now, that shouldn’t be a problem.

SubSpace is a two-dimensional space shooter computer game published in 1997 by Virgin Interactive Entertainment (VIE), which was a finalist for the Academy of Interactive Arts & Sciences Online Game of the Year Award in 1998. This game, considered by some as freeware, and others as “abandonware” incorporates quasi-realistic zero-friction physics into a massively multiplayer online game through the Continuum game client. It is no longer operated by VIE; instead, fans and players of the game provide servers and technical updates. The action is viewed from above, which presents challenges very different from those of a three-dimensional game. The game has no built-in story or set of goals; players may enter a variety of servers, each of which have differing objectives, maps, sounds, and graphics.

Although falling short of modern standards, SubSpace is widely considered an early entry in the massively multiplayer online genre due to its unprecedented player counts. While playing SubSpace, I entered the development scene by creating bespoke zones, bots and server code. I am also actively working on porting both the SubSpace client to Mac OSX with WINE, and porting the open source server side software to Mac OSX.

OS X Continuum (YouTube Video)

Due to the release of Intel Macs, Continuum can now be run on OS X with wine by applying a simple modification to the source tree before compiling. I have written this tutorial twice, one for those who’ve got some experience with the command line, and compiling software - and another presuming that you have no experience with the command line.

Support

If you have any issues, small or large with Continuum on OS X, then please read (and search) these forums, and if the question hasn’t already been asked make a post. There are plenty of tech-savvy users within the community that will be able to help you with almost any problem that you’re facing, and I also read those forums regularly.

Also, I’d also like to mention some things regarding OS X continuum now. If you’re using XCode version 3.x, you will not be able to compile in 16-bit. For the majority of you, this will not be a problem however there is a major advantage of running Continuum in 16-bit while playing: performance. For some reason that I can’t find out, when I enter some zones in 32bit, the client will download all files then just before entering stall for so long that not enough reliable packets are sent to the server - then disconnect. Possible causes could be zlib or data not reading fast enough from memory, either reason is beyond me.

So, if you do not want this kind of hassle, use XCode 2.x to compile in 16-bit, however you’ll then need to compile freetype/fontforge/bison etc straight from source, not Macports. It’s a real pain of an issue, but the only zones that I have had this problem in are SSCE Hyperspace and SSCU DeathStarBattle (intermittent, it will work in 32-bit 80% of the time). If anybody has found any solutions to this issue then drop me a line, or leave a post on the forums.

Guide

Before we start, there are some basic hardware requirements for running Continuum on OS X. Aforementioned, is that you will require an Intel processor. This can be found out by clicking on the apple logo at the top left of your screen, then clicking ‘About This Mac’ - you will either have an Intel or Power PC (PPC) processor. Sorry PPC folks, but since Darwin is now abandonware, I can’t help you running Continuum on your Mac, I neither have the time (or a PPC Mac to test).

You will also require software to compile wine, and any other packages which we may need to run Continuum. I recommend XCode, as this is all that I have ever worked with while using a Mac, however something to note is XCode 3.x can’t handle Wine 16bit compiles, which means you will only be able to run Continuum in 32 bit which *may not run as smoothly as Continuum in 16bit. If anybody is still using XCode 2.x and could provide me some information on FPS in 16bit, I’d be very grateful!

Once you’ve got your compiler, you will require some kind of package manager. I recommend Macports, which can be downloaded as a binary from here.

Utilities

This whole install will take place within Terminal, or for those of you who don’t know what Terminal is - at the command line interface. To open Terminal, in the finder navigate to Applications -> Utilities -> Terminal, or to save time simply run a search for ‘Terminal’ and hit return when it is found.

Okay, let’s begin

Once we have all the required software, we can begin executing all the commands that we need to in Terminal to install Wine and packages via Macports. (Note: The $ before commands means that it is a command executed within Terminal, don’t include the $ in your commands.)

In the Terminal Window:

$ cd ~/Desktop
$ mkdir wineinstall
$ cd wineinstall 
$ curl -C - -O http://dl.krslynx.com/software/wine-1.1.29.tar.bz2
$ curl -C - -O http://dl.krslynx.com/software/Continuum040Setup-1.exe
$ curl -C - -O http://dl.krslynx.com/software/macports.zip
$ unzip macports
$ open MacPorts-1.8.0.pkg

Run the installer, and install Macports

$ tar -xvjf wine-1.1.29.tar.bz2
$ cd wine-1.1.29
$ curl -C - -O http://dl.krslynx.com/software/cont.diff
$ sudo port install bison ftgl libpng xrender fontconfig freetype xorg

Enter your password, it will not show up with ** like you may be used to, however once you’re done hit return.

$ ./configure --disable-win16 *NOTE: --disable-win16 is only for those using XCode 3.x, if you're using 2.x, do not add the --disable-win16 pipe!

$ cat cont.diff | patch -p1
$ make depend && make -j 2
$ sudo make install

Enter your password, it will not show up with ** like you may be used to, however once you’re done hit return.

$ winecfg

On the opening window, select ‘Add Application’.

Navigate to C:/Program Files/Continuum/Continuum.exe and hit ‘Open’. Make sure that you select the Windows version as ‘Windows XP’. If you aren’t going to be running any other windows softwares through wine, you can just select ‘Windows XP’ as the default Windows Version.

Under the drives tab, select /drive_c, and then hit the ‘Show Advanced’ button. In order to connect to Catid billers, and in order to avoid getting net-banned as soon as you enter a zone, change the Serial number to anything above 2000. Once you’ve done that, return to Terminal.

$ wine ~/Continuum040Setup-1.exe

(Run through the steps in the Continuum installer, as you would, deselecting ‘Make a desktop icon’, ‘Show What’s New’)

$ wine ~/.wine/drive_c/Program\ Files/Continuum/Continuum.exe WINEDEBUG+warn+all

Now, do a test of Continuum. Make sure that everything works, and try to test in a small windowed resolution (in my experience, full screen is rather annoying to play under). If everything is okay, proceed with the rest of the steps.

$ cd ~/Desktop
$ rm wineinstall
$ touch Continuum.sh
$ echo "wine ~/.wine/drive_c/Program\ Files/Continuum/Continuum.exe;
$ killall Terminal;
$ killall xinit" | sudo tee -a ~/Desktop/Continuum.sh
$ chmod 700 continuum.sh
$ chmod a+x continuum.sh 
$ exit 

OKay, now that we’ve fully installed Continuum, it’s best to make some minor modifications to help it run better on your system.

Compiling from Source

In order to run Continuum on OS X, you’ll need the Wine source and will need to run this patch after running ./configure, and will need the following packages from Macports.

bison freetype fontforge

You’ll also need X11 for Wine, which can either be downloaded from Macports or elsewhere. In order to not get banned from all zones, you’ll need to run winecfg, and set your drive sereal number to anything above 2000. Again, if you’d like improved performance make sure that you compile with XCode 2.x, however remember that this method will require you to also compile bison, freetype, fontforge and anything else you may use Macports for from source.