Tuesday, September 22, 2009

Compiling simutrans

Installing prerequisites,

apt-get install zlib1g-dev libpng12-dev libSDL1.2-dev libsdl-mixer1.2-dev subversion make g++
Get the source code,
svn co svn://tron.homeunix.org/simutrans/simutrans/trunk
Username is anon with empty password.
Setup,
Add #include "stdlib.h" to dataobj/koord.h.
Copy config.template to config.default.
Add at the end of config.default,
FLAGS += -DBIG_ENDIAN
FLAGS += -DUSE_C
and set,
BACKEND = sdl
COLOUR_DEPTH = 16
OSTYPE = linux
DEBUG = 0
OPTIMISE = 1
PROFILE=0
SDL_CONFIG = sdl-config
now,
make
On my zaurus the compilation takes about 3 hours. To run simutrans I first install the 102 version from the sid repositories and its dependencies (simutrans-pak64, simutrans-data and simutrans), then I copied the compiled binary (called sim) to /usr/share/games/simutrans and ran it from there, otherwise simutrans doesn't find the data files.
The downside is that apparently the Zaurus is too weak to run simutrans. I got 7fps at most and usually 4fps. I also tried to change to pakHAJO, but it didn't improve the situation much. I also tried pak32, which showed a little better performance.

No comments:

Post a Comment