858585
January 5th, 2006 at 10:48PM in oldsite
Lately I've been tinkering quite a bit with the ut2004 dedicated server I run. Needless to say, I've run into some, ahem, frustrations. The problem with running a dedicated game server is that you have to either keep it stock (which still won't solve all problems, just most) or you have to configure it to handle version mismatches and clients without expected data (maps, texture, etc).
Now,
UT2004 can actually handle someone connecting without a map/texture/sound by "pushing" the data to the client. The problem is the default "UT2004 Server Push" methodology is painfully slow, and they knew it.
So they created something called redirection. This is pretty snazzy, as you can throw all the files in play (or the ones you know no one will have) on another server (or hell, even the same server,
HTTP is still a faster transfer than
UT2004 server->client).
For those of you that remember redirection in the original
UT, this is nowhere near as big a bitch to set up. Hell, to reduce load, they even have made a way for you to compress the files that are being served.
Here is the problem
There is no documentation for compressing the files on a linux server. You just have to find the windows instructions and modify them. The other problem? It handles mass files very, very, badly. Like repeated
SEG Faults. Which is bullshit.
Now, one way to work around this is to just handle it in smaller batches using wild cards or the like. This is not much better than doing it one by one.
So, for you, darling reader, I present
The Better Way
#!/bin/sh
# Compress many files, one by one
for filename in /home/user/path/to/files/forCompression/*.ut2
do
echo "Variable filename is set to $filename..."
./ucc-bin compress $filename
done
Simple, no?
Basically, just copy and paste this into a blank file on your server,
store it in your ./UT2004/System/ directory
modify /home/user/path/to/files/forCompression/*.ut2 to properly reflect the correct path for the files to be compressed, and edit the wildcard as needed.
A word of advice, I would copy all of the files you intend to compress, compress them, then delete the copies, making no changes to your original files.
1 Comment. Comments Closed!
figment
Jan 18th, 2006 at 8:08AM
what's that you mentioned about your being a geek? whatever it was, I wholeheartedly agree.