SRCDS Steam group


Bzipping maps for download
#1
Code:
Intro:
This tutorial is about compressing maps for faster downloading when a client connects to your gameserver, you must have a webserver in order to use this. This tutorial includes both Linux and Windows instructions, Linux is the first 2 posts and Windows is the last 2, enjoy!

Also, check out this program for a simliar utility:
http://www.brainless.us/index.php?name=Downloads&req=viewdownload&cid=6

1--> LINUX (see below for windows instructions)

===============
WHAT YOU NEED
===============
Download Bzip2:

In Linux Konsole

Code:
wget http://www.bzip.org/1.0.3/bzip2-103-x86-linux26

If the above program does not work for you here is the download page for other versions:
http://www.bzip.org/downloads.html <- get the executable 1.03 named "bzip2-103-x86-linux26"
================
SETUP FOR LINUX
================
1.Move the download file from where you downloaded it to a folder in your account directory called bzip2 (make sure you are in the same place you downloaded your file to)

Code:
mv bzip2-103-x86-linux26 /home/ACCOUNTNAME/bzip2

2. Change to the directory where you moved the file:

Code:
cd /home/ACCOUNTNAME/bzip2

3. Rename it "bzip2":

Code:
cp bzip2-103-x86-linux26 bzip2

4. Now move your .BSP (map) files into the ACCOUNTNAME/bzip2 directory by FTP or by changing directory (cd command) to your hlds/game/maps dir (if on the same machine as your are bzipping on.
Reply
#2
==================
BZIPPING ON LINUX
==================
1.Change to the directory where your bzip file is.

Code:
cd home/ACCOUNTNAME/bzip2

2. Run bzip2 and select the .BSP file you want to compress

Code:
bzip2 -v filename.bsp

Replace filename.bsp with your mapname.bsp

3. You can upload them using the "ftp server" command in linux console or by grabbing them from the linux computer using ftp on windows and then uploading the bzipped files to your webserver and into the apporpriate folder, for example: http://www.domain.com/game/maps

4. For those that don't have the ability to use FTP on a Windows computer, here is a brief way to use the linux konsole to ftp your bzipped files.

========================
FTP USING LINUX KONSOLE
========================
First change to your bzipped files directory:

Code:
cd home/ACCOUNTNAME/bzip2

Connect to your webserver:

Code:
ftp www.domain.com

The typical "account@localhost will change to "ftp>" this means that all commands will be passed on the FTP server not on the linux machine.
Now change to the directory where you store your maps on your webserver:

Code:
cd www/game/maps

If you don't know your directory structure by heart, you can run the "ls" command and it will list the names of the folders.

Now that you are in the maps directory of your webserver you can begin to upload your bzipped files:

Code:
put mapname.bsp.bz2

or to upload multiple maps at once:

Code:
mput mapname.bsp.bz2 mapname2.bsp.bz2

After you have uploaded all of your bzipped maps, you might want to get rid of the non-compressed ones.

Code:
delete mapname.bsp

Press CRTL + Z to exit FTP.

DONE!
Reply
#3
2--> WINDOWS (see above for linux)

===============
WHAT YOU NEED
===============
Download Bzip2:

Windows:
http://www.bzip.org/1.0.2/bzip2-102-x86-win32.exe

if the above program does not work for you here is the download page for other versions:

http://www.bzip.org/downloads.html

====================
SETUP FOR WINDOWS
====================
1. Move the download file (make sure it is for windows) into an empty folder in your default harddisk called "bzip2". (without the quotes)
So an example of the path to the downloaded file's FOLDER would look like:

C:\bzip2

Change C to your default hardisk

2. Rename the file "bzip2.exe" (don't use the quotes)
3. Add your .BSP files that you want compressed into the bzip2 folder.
Reply
#4
=================
BZIPPING for WINDOWS
=================
1. Go to Start menu > Run and enter "cmd" (without quotes) into the text area.
2. Click ok and a black window should open.
3. type:

Code:
cd C:\bzip2

Again, changing C to your default harddisk then press ENTER.
4 Now type:

Code:
bzip2 -v filename.bsp

Replace filename.bsp with your map name.
5. This will compress your .BSP file to do another, press the up arrow and change the filename.
6. Once you have compressed all of your .BSP files, upload them to your WEBSERVER into the correct location, i.e. "www.domain.com /game/maps"
and delete the non-zipped versions.

DONE!

Reply
#5
the prettiest tutorial on bzip! good job
Reply
#6
Thanks, I took it off my main site and put into the forums. Check it out in HTML format here:

http://bzip.tenth-mountain.com
Reply
#7
At C prompt, I would just type

Code:
bzip2 \bzip2\*.bsp

*assumig that you have bzip2.exe in C directory and you have bzip2 folder in C directory as well*

any need for -v in your line?
Reply
#8
I am pretty sure (it has been a while) the -v command is for verbose i.e. tells you what it is doing, instead of letting wonder if it is still working or not.
Reply
#9
oh I see

but you can just press F5 and refresh the folder view and check their sizes Wink

I know I do things the hard way Toungue
Reply
#10
I'm more of a linux person, so I wouldn't know.
Reply
#11
also, for windows users, if you have a large amount of maps, you can just type

bzip2.exe -v *.bsp

that will bzip all the .bsp files in the folder you have bzip2 in...
Reply
#12
Umm, I folowed you instruction. I know have
C:\bzip2
withing that I have bzip2(application)
and added all the maps in that same place.
But when I go to my command prompt to bzip the files
i type
cd C:\bzip2
then
bzip2 -v *.bsp
didnt work so I tried individually doing it
and what I got said
Program to big to fit in memory
Help??
Reply
#13
http://forums.srcds.com/viewtopic/9629
in my opinion the one in my comment is much easier to use. put maps in compress folder and then run the bat file
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)