Easy OpenTTD (Dedicated Server) Installer (Linux Only)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
PinguTux
Engineer
Engineer
Posts: 16
Joined: 03 Apr 2005 22:23
Location: Near Karlsruhe, Germany
Contact:

Easy OpenTTD (Dedicated Server) Installer (Linux Only)

Post by PinguTux »

Hi!

I have created an easy to use Installer for OpenTTD using the http://www.autopackage.org Tools.

It automatically sets up the Installation, downloads the data files from the internet (Legal remarks: You must own the original CD) and creates an Icon in the Gnome/KDE menu.

For Dedicated Server Admins there are two additional goodies (ottd-start & ottd-attach), to ease the administration, included.

Installation instructions can be found at http://www.familie-kirchhofer.de/openttd/autopackage/.

I'm appreciating any comments/suggestions!

PinguTux
mikehearn
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2005 19:15

Post by mikehearn »

Cool! I just tried this and it works great. A few comments (I am an autopackage developer):

- It installs to $PREFIX/opt by default. That works OK but why stick /opt in there?

- When it starts I get a couple of warnings like so:
MD5 of TRG1R.GRF is ****INCORRECT**** - File Corrupt.
MD5 of TRGIR.GRF is ****INCORRECT**** - File Corrupt.

- No music? I have the original TT CD but it downloaded the datafiles for me.

Can we list this in the package list on our website?

If you have any comments on the package creation process, please do drop by and let us know.
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

1. The general idea is that if a root installs the game, the game itself should go to /opt for example so it is accessible by all users.
2. MD5 warnings: if you have a modified grf file, or not the exact one that is checked you get this. If the game works it is not a problem usually. There are apparently many original, slightly different TTDLX versions out there, and we could only test a few.
3. Music: make sure to put music in gm/ folder and start OTTD with -m extmidi.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
PinguTux
Engineer
Engineer
Posts: 16
Joined: 03 Apr 2005 22:23
Location: Near Karlsruhe, Germany
Contact:

Post by PinguTux »

Thanks for the comments!

1. Another reason is that normally all OpenTTD datafiles must reside in the same directory where the openttd executable lies. I hacked the Makefile a little bit to ease this restriction so i can put the binary in $PREFIX/opt/openttd/bin and the datafiles in $PREFIX/opt/openttd/data. Thus OpenTTD is completely contained in the $PREFIX/opt/openttd directory (similar to other games, e.g. UT2004 -> /opt/ut2004/{bin,data})

2. The MD5 warnings are there because i patched the datafiles with the "New Stations" and "Font Renew" Patch from http://users2.tt-forums.net/ttdur/ttdur.htm . I'm replacing these modified files with the vanilla files, to stop the warning messages from confusing new users. The modified files can still be downloaded from my homepage and then copied into the data directory (The patches cannot be applied under linux :/)

3. Yes, there are no music midi files included in v1.0 of the openttd-data packge. I'm currently preparing another release which will include the necessary music files.

Last but not least you can list it on the autopackage website.
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

I have installed your packlage on my server, and have set openttd.cfg file like openttd wiki guidelines.
If i launch command "ottd-start" obtain this output:

Starting OpenTTD Dedicated Server...Done
Server ready and detached


But the server don't appears in the server list and in my "ps aux" command output.
If i launch command "ottd-attach" obtain this output:

To detach press CTRL a and d
There is no screen to be attached matching openttd_dedicated.


What is the problem?
PinguTux
Engineer
Engineer
Posts: 16
Joined: 03 Apr 2005 22:23
Location: Near Karlsruhe, Germany
Contact:

Post by PinguTux »

Try running "openttd_dedicated -D", this will bypass the startup script.
If you're getting any errors please post it here.
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

PinguTux wrote:Try running "openttd_dedicated -D", this will bypass the startup script.
If you're getting any errors please post it here.
Ok. The server running.
But the client don't recognize the server version, is avaible autopackage of version 0.3.6?

Thanks for aid.
mikehearn
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2005 19:15

Post by mikehearn »

PinguTux: I tried the latest version but it didn't upgrade the data files. You can use requireAtLeastVersion if you want that (the skeleton has to be able to detect what version of the data files you have though!)
PinguTux
Engineer
Engineer
Posts: 16
Joined: 03 Apr 2005 22:23
Location: Near Karlsruhe, Germany
Contact:

Post by PinguTux »

@The Master:
I have just finished uploading an autopackage for 0.3.6.
You can find it at the website.

@mikehearn:
The new datafile package is now available. It will fix the MD5 warnings and includes MIDI music support.

Additionally I have improved the openttd(-dedicated) installer, it will now show the revision number in the gnome/kde menu. (I have just discovered the safeSed function, autopackage is nifty :)
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

PinguTux wrote:@The Master:
I have just finished uploading an autopackage for 0.3.6.
You can find it at the website.
This package request SDL, is not dedicated.
I have virtual server, without root access, and my install action is limited, but autopackage run, is possible for you to make dedicated version of 0.3.6?

Thanks for aid.
PinguTux
Engineer
Engineer
Posts: 16
Joined: 03 Apr 2005 22:23
Location: Near Karlsruhe, Germany
Contact:

Post by PinguTux »

Ah, sorry, I forgot to create an dedicated server package too ...
You can now find the 0.3.6 dedicated server package at the website.
mikehearn
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2005 19:15

Post by mikehearn »

Hi again,

I installed the latest svn snapshot of the game (the rXYZ package) and now there are lots of tracks in the music player. But none of them play, and when i open it up it's cycling between all the songs over and over.

I don't think this is a package problem, more likely my computer can't play MIDI for some reason. It's ALSA, FC3. Any ideas where I should look? I was playing OpenTTD all last night but it's not quite the same without music :)

BTW good job on fixing the XML file. It upgrades nicely now.

thanks -mike
PinguTux
Engineer
Engineer
Posts: 16
Joined: 03 Apr 2005 22:23
Location: Near Karlsruhe, Germany
Contact:

Post by PinguTux »

Hi!
You need the "Timidity++" midi player software.
As a notice: OpenTTD MIDI support for Linux is still a little bit flakey :/
mikehearn
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2005 19:15

Post by mikehearn »

Ah OK, maybe you could make that a recommended dependency of the package? It means writing a skeleton for Timidity++, then using recommend() instead of require().

If it's a C++ library then it may be worth statically linking it.
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

PinguTux wrote:Ah, sorry, I forgot to create an dedicated server package too ...
You can now find the 0.3.6 dedicated server package at the website.
Thanks. my server work, and i gaming with my client 0.3.6.
:D
mikehearn
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2005 19:15

Post by mikehearn »

I got timidity, but my processor isn't fast enough to do both gaming and music rendering at once. I pre-rendered the MIDI files to WAV files and then it got a lot faster.

Maybe it'd be a nice feature to have the music also available as ogg vorbis files, as they take far less CPU time to play than MIDI files do on poor sound cards like mine,.
User avatar
orudge
Administrator
Administrator
Posts: 25226
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

The next version of OpenTTD after 0.4.0 will probably have my new music patch integrated, once I actually finish it. (I'm nearly there. ;)) You can download the TT music as played on an ESS AudioDrive - for that classic retro sound - from http://users.tt-forums.net/jfs/ - MP3, I'm afraid, but it's better than nothing. ;)
PinguTux
Engineer
Engineer
Posts: 16
Joined: 03 Apr 2005 22:23
Location: Near Karlsruhe, Germany
Contact:

Post by PinguTux »

@mikehearn: try this package: http://www.familie-kirchhofer.de/opentt ... 86.package
It's with SDL_mixer support, maybe it's faster ... (it isn't using timidity anymore)

@orudge: I'm curious about the new music system :)
User avatar
orudge
Administrator
Administrator
Posts: 25226
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

There's a thread about it... somewhere. I'll maybe post a test binary and patch next weekend, see how things go.
mikehearn
Engineer
Engineer
Posts: 6
Joined: 04 Apr 2005 19:15

Post by mikehearn »

Wow yes, that works *much* better than the timidity version does! The sound quality isn't wonderful, it crackles a bit, but my sound card sucks so that was expected.

Thanks!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 7 guests