SimCity is one of the most popular and well-known video games of all time. This game was ported to Unix in the 1990s and the source code has since been released under the GPL version 3. Micropolis is the resulting program (as well as the original working title of the game.) Making this game work correctly is easy enough once you know the recipe.
For Ubuntu Hardy (8.04.x) users, the most sensible thing to do at this point is to simply download Micropolis from my PPA archive. In theory this might work on older and should certainly work on later distributions of Ubuntu. I would be surprised if it did not also work on pretty much any other Debian distribution because it only depends on some common X libraries and includes its own copy of Tcl/Tk. You can also download a package from getdeb (or someplace else) but this is a bit older. If you have a non-debian system which does not already package Micropolis, you will want to build the sources.
The software is licensed under the GPL version 3 or later, so these instructions are as well. Not because it is required of me, but in keeping with the spirit of the game. (I have also created a GPLv3+-licensed PPA package, see bottom for details.) There is an additional license statement (as permitted) stating that Electronic Arts (the current license holders) are indemnified from all potential warranty claims and the like, and that a requirement of distribution is that you not represent the game as being Simcity. Therefore, I must inform you that this game is not Simcity - it is a GPLv3-licensed fork of the Simcity code which is known as Micropolis.
Please note that I did this on Ubuntu Hardy, tested on both i386 and amd64; these instructions therefore might not work anywhere else, although I think they will.
Building the Code
The game doesn't draw the playfield without some patching. Here's the more or less complete process. Note that this example does not include installing the various -dev packages you will need (yet?)
- You need to download the source code. You can either get the original source code and the patch, or you can download the latest sources.
- Original Source + Patch:
- Visit the home site and download micropolis-activity-source.tgz, the source code for the game.
- Unpack the source, it will make a directory called
micropolis-activity. - cd into
micropolis-activityand download the patch: micropolis_git.patch. This patch is (supposedly) automatically updated. You can do this from the commandline with:
wget http://rmdir.de/~michael/micropolis_git.patch - Apply the patch:
patch -p1 < micropolis_git.patch>
- Current Source
You can either download a tarball or clone the git repository.- Tarball
Download the direct tarball - Clone git
git clone git://git.zerfleddert.de/micropolis
- Tarball
- Original Source + Patch:
- Build the source: cd into
micropolis-activity/srcand typemake. Substitutemicropolisformicropolis-activityin all subsequent examples if you are using the git version. - Copy the executable to the proper directory:
make install - Install the program to a permanent location: cd into the
micropolis-activitydirectory and type the following
sudo mkdir -p /opt/micropolis tar --exclude=src -cf - * | sudo tar -C /opt/micropolis/ -xvf -
That's it. You can now run micropolis from /opt/micropolis/Micropolis.
The short short form
Copy and paste:
wget -O micropolis-latest.tgz http://git.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis?a=snapshot;h=HEAD;sf=tgz
tar xvfz micropolis-latest.tgz
cd micropolis/src
make && make install
cd ..
sudo mkdir -p /opt/micropolis
tar --exclude=src -cf - * | sudo tar -C /opt/micropolis/ -xvf -