Optimizing map downloads and etc...

Discussion in 'Server Discussion' started by animekrash, Aug 14, 2010.

  1. animekrash

    animekrash L1: Registered

    Positive Ratings:
    Okay first off...this is my first post here be kind <3 I am a admin on a TF2 server, and i have tried, successfully, to add maps to the server. Which, depending on the file size, can take /forever/ to for everyone to download from the server. Which, some people can deal with some can't.

    As I worked on this trying to figure out some problems, solving those problems, I came across the compressing the .bsp to .bzp2 (or whatever the actual extension is). Which, if I understood what I read, if you put both the compressed and uncompressed file on the server, that TF2 should look for the .bzp2 first and parse that out to people needing to download it.

    First off, is any part of that a misconception?

    Secondly, if it isn't, why did the server download out the .bsp and not the .bzp2?

    Thirdly, once that is working, when tf2 dishes out the .bzp2 will people need to manually unzip it? or will tf2 automatically uncompress?

    As well i've read about people using...file hosting or some sort of thing to reroute the download from the tf2 server to download from that, and that that is a faster way to download maps. If that is true, a. how does it work? b. does anyone have any website suggestions for that?

    Thank you for your time, this has been an enlightening and largely frustrating venture into the tf2 server world. Will appreciate the help.


  2. Jayden

    Jayden L1: Registered

    Positive Ratings:
    I'm looking for more documentation as well, and this may need some tinkering and correction, but here's how I understand it.

    You'll first want to have compressed versions of all your .bsp maps, as a bz2. If someone needs to download a custom map, the engine first looks to download a .bsp.bz2 before it loks for a .bsp (or atleast it will in the method I'll detail next). The BZ2 format uses only 10% the size (and thus bandwidth and download time) that a normal file will.

    If you're hosting from the game from tf2.yourserver.com, then you don't want people downloading from the same place. Rather, you'll create a new folder and set that as download url. Namely, yourserve.com/tf2/maps. You can use sv_downloadurl in your config to point players there.

    Expirement and let me know, I'll be setting mine up later tonight/tommorow morning.
  3. MrAlBobo

    MrAlBobo L13: Stunning Member

    Positive Ratings:
    i had a guide somewhere on this site, but it has mysteriously vanished

    anyways...ive never tried putting a bz2 directly on the server, so i can't help you in that case.
    But for the ideal setup you want to get a webhost where you can host all the bz2 versions of your maps.
    Assuming you have found a webhost, you now need to make a /maps directory and put your maps there, "http://something/tf/maps" as a random example. After you have a few bz2 zipped maps there you need to add the following line to your server.cfg:
    This is assuming that your maps are at "http://something/tf/maps". It automatically looks for a maps folder in the directory you give it.

    The maps are automatically unzipped when a person downloads it.

    Also, the size of the bz2 can vary widely from map to map to map, and the compression is usually much better then 10%
  4. Terr

    aa Terr Cranky Coder

    Positive Ratings:
    Unless you are the mapper (who has some techniques at their disposal to shrink filesizes) Using .bz2 files and an external download link are the two big ones. (You can use 7-zip to compress them if you aren't on a linux/unix environment.)

    That seems a bit exaggerated. I'd say more like 50% for custom maps.
    Last edited: Aug 21, 2010
  5. MjRNuT

    MjRNuT L1: Registered

    Positive Ratings:
    • Thanks Thanks x 1
  6. MacNetron

    MacNetron L5: Dapper Member

    Positive Ratings:
    ^^ although not specific for TF2, it is quite a good link. Most stuff is in it.

    Another advantage of using the sv_downloadurl is that multiple servers can point to the same download location!
    At PlayStuff.net we have multiple servers, but only one location with bz2-files. This saves loads of space.

    So, the main advantages are:
    * smaller downloads for clients (tf2 unpacks the bz2), means less time waiting
    * lower bandwidth usage (and server load too if bz2's are stored on a separate location)
    * one download place for multiple servers