Tiny Core Linux
Tiny Core Extensions => TCE Talk => Extension requests => Topic started by: yoshi314 on August 09, 2011, 07:01:53 AM
-
openttd is a strategy game based on transport tycoon deluxe. It is a rewrite under GPL licence and recently the project created its own data replacement, so that you no longer need to use data files from old transport tycoon game (which are non-free).
I was planning to post an extension but the procedure is fairly simple to build one on your own. And i still have a few doubts about a couple of things.
How to make the extension :
i took prebuilt binaries for i686.
http://binaries.openttd.org/releases/1.1.1/openttd-1.1.1-linux-generic-i686.tar.gz
and graphics data
http://binaries.openttd.org/extra/opengfx/0.3.4/opengfx-0.3.4-all.zip
unpack binaries somewhere, and the files from opengfx into data/ subdirectory. and you can package it using standard practices.
dependencies :
libpng
sdl
fontconfig
icu
I've tested this game and it works with necessary packages off tce repository.
The binaries provided don't really care about the directory you put them in. I put it into /usr/local/openttd and it worked. It also worked from home directory.
The problem - game offers online updates for game data (not the binaries) and addons (ai, maps, graphic packs, music). Also, on first run it will complain about missing music and sound packs, which can be downloaded (but are not required to play).
Any downloaded addon data is stored in ~/.openttd. You can also add it into games data/ directory and it will work too. I am not sure whether extension should package music and sfx, or should it be offered as a download from the game itself?
game + opengfx is the absolute minimum to run it. rest can be downloaded through the game's extension manager. so i am unsure what to include in the extension, and what to offer as a download.
-
My guess:
openttd (binaries)
openttd-gfx (to have a choice in case you own original game data and wish to use it instead)
openttd-sfx (in case you don't want sound)
in-game addons are quite separate so I don't see a reason there should be a package for this.
I might give it a try packaging this wonderful game; maybe this week.
-
in-game addons are quite separate so I don't see a reason there should be a package for this.
it's kind of a double sided problem
i'm thinking of a situation where you have LOTS of addons.
1. packaged in tcz - game takes a bit longer to start up, as tcz files are usually read off the media, and not really cached in ram.
2.in ~/.openttd - mydata.tgz gets very big, slow startup/shutdown of TC.
i tested this with all available addons installed, even though they weren't activated. game just takes a while to scan through them.
personally, i'd opt for an extra script that will allow user to move his addons from ~/.openttd to tcz file. although such situation is rather uncommon, unless you're a big fan of the game.
-
it anyone wants to quickly test openttd on TC, i hacked together a script that will generate TCZ for you from latest stable generic 32bit prebuilt binaries from openttd.org
openttd.tcz.dep (needs verification)
SDL.tcz
expat2.tcz
bzip2-lib.tcz
fontconfig.tcz
build-tcz.sh
#!/bin/bash
rm versions.txt
wget http://finger.openttd.org/versions.txt
version=$(grep releases versions.txt | grep stable | awk ' { print $1 }' | egrep '[0-9]')
gfxver=$(grep opengfx versions.txt | awk ' { print $1 } ')
rm versions.txt
wget -c http://binaries.openttd.org/releases/${version}/openttd-${version}-linux-generic-i686.tar.gz
wget -c http://binaries.openttd.org/extra/opengfx/${gfxver}/opengfx-${gfxver}-all.zip
mkdir -p openttd/usr/local/openttd
tar xvzpf openttd-${version}-linux-generic-i686.tar.gz --strip-components=1 -C openttd/usr/local/openttd
unzip opengfx-${gfxver}-all.zip
mv opengfx-${gfxver}/* openttd/usr/local/openttd/data
rm -rf opengfx-${gfxver}
mkdir -p openttd/usr/local/share/{applications,pixmaps}
cp openttd/usr/local/openttd/media/openttd.desktop openttd/usr/local/share/applications
cp openttd/usr/local/openttd/media/openttd*.png openttd/usr/local/share/pixmaps
cp openttd/usr/local/openttd/media/openttd*.xpm openttd/usr/local/share/pixmaps
sed -i -e 's|\(Exec=\).*|\1/usr/local/openttd/openttd|g' openttd/usr/local/share/applications/openttd.desktop
[ -e "openttd.tcz" ] && rm openttd.tcz
mksquashfs openttd openttd.tcz -force-uid 1001 -force-gid 50
md5sum openttd.tcz > openttd.tcz.md5.txt
it basically puts together lastest stable openttd + latest official opengfx (free replacement for original graphic files) and creates a desktop file for /usr/local/share/applications (icon is probably installed in wrong place). tested on 4.1, works.
you should have openttd.tcz, openttd.tcz.dep and openttd.tcz.md5.txt when it's done.
game will put a warning about missing sound/music files - they can be downloaded from the game's menus in online addons section, and will be placed in ~/.openttd