"Compressed .bsp files"

"Compressed .bsp files"

Re: "Compressed .bsp files" Posted by Vix on Wed Jun 7th 2006 at 4:26pm
Vix
38 posts
Posted 2006-06-07 4:26pm
Vix
member
38 posts 14 snarkmarks Registered: Nov 24th 2004 Occupation: Computers Location: Spain
Hi there :biggrin:

I heard a little rumor, i wonder if it is true. ?Is it possible to compress .bsp files? I mean, that the file is compressed 'as is' (bsp format), to reduce the space. (obiously) So, when you have the compressed .bsp, it is downloaded faster from the server. Very useful for large maps. "Rat" type maps, for example.

?Does anybody know about this?

Thanks in advance :rolleyes:
Re: "Compressed .bsp files" Posted by Dark_Kilauea on Wed Jun 7th 2006 at 4:42pm
Dark_Kilauea
629 posts
Posted 2006-06-07 4:42pm
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
Zip and Rar files do compress .bsp files a bit.

However, when someone downloads from a server, HL2 already compresses the file before sending it.

So, the simple answer is no, there is no way to compress a bsp before hand to make downloads faster.

[edit] Fixed typo.
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: "Compressed .bsp files" Posted by Jamel-The-Camel on Wed Jun 7th 2006 at 4:53pm
Jamel-The-Camel
23 posts
Posted 2006-06-07 4:53pm
23 posts 2 snarkmarks Registered: May 31st 2006
HL2 already compresses the file before sending it.
Really, I never knew that? Do you have any idea on what ratio?
'The ability to quote is a serviceable substitute for wit.' - Somerset Maugham
Re: "Compressed .bsp files" Posted by Andrei on Wed Jun 7th 2006 at 6:36pm
Andrei
2455 posts
Posted 2006-06-07 6:36pm
Andrei
member
2455 posts 1248 snarkmarks Registered: Sep 15th 2003 Location: Bucharest, Romania
So, the simple answer is no, there is no way to compress a bsp before hand to make compiles faster.
I remember HL1 had a .bsp optimizer that also reduced the size of the .bsp itself but I doubt such a thing exists for HL2.
Re: "Compressed .bsp files" Posted by Dark_Kilauea on Wed Jun 7th 2006 at 7:34pm
Dark_Kilauea
629 posts
Posted 2006-06-07 7:34pm
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
Yea, HL2 turns the file into a bz2 (a zip format) before sending.

If you run a server, you'll see a message in the console whenever someone has to download the map.
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: "Compressed .bsp files" Posted by fishy on Wed Jun 7th 2006 at 8:28pm
fishy
2623 posts
Posted 2006-06-07 8:28pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
you also see it when you're downloading a new map from a server.

downloading newmap.bsp.bz2
i eat paint
Re: "Compressed .bsp files" Posted by Naklajat on Wed Jun 7th 2006 at 9:33pm
Naklajat
1137 posts
Posted 2006-06-07 9:33pm
Naklajat
member
1137 posts 384 snarkmarks Registered: Nov 15th 2004 Occupation: Baron Location: Austin, Texas
It doesn't do that automatically, and you have to host it elsewhere on the web (an http server) and set sv_downloadurl for it to work.

I use 7-zip to compress the files in BZ2 format, naming them mapname.bsp.bz2

Upload them to a web server (I'm pretty sure it does NOT work on a pure FTP server, it has to have http) in the same folder structure you would find in your hl2dm/cstrike folder (ie make a folder called 'maps')

In server.cfg, point sv_downloadurl to the directory on your webserver where the 'maps' folder resides.

sv_downloadurl "http://www.yoursite.com/fastdownloads/" (or wherever you want to put the files.)

[EDIT]
This also works for any other files clients would have to download, including textures and sounds.

o

Re: "Compressed .bsp files" Posted by Vix on Thu Jun 8th 2006 at 5:26am
Vix
38 posts
Posted 2006-06-08 5:26am
Vix
member
38 posts 14 snarkmarks Registered: Nov 24th 2004 Occupation: Computers Location: Spain
That's correct. As Baron says, that is the method i found after a while searching.

I will try it as soon as i can in my server.

Thank's :smile:
Re: "Compressed .bsp files" Posted by nappy on Thu Jun 8th 2006 at 12:06pm
nappy
19 posts
Posted 2006-06-08 12:06pm
nappy
member
19 posts 62 snarkmarks Registered: May 19th 2006 Occupation: Software engineer Location: Netherlands
Big advantage to the method described by the baron is that it does not use the upload bandwith of your server. Very handy if you run a server on a home dsl line :smile:
http://maps.nappy.cc for more info and maps