Page 1 of 1

Access Files and Downloadable Textures

Posted: Fri Feb 18, 2005 9:24 pm
by trepan
In the upcoming bzflag release (2.0.2), there will be two files
that control server and download access. There two files should
be placed in your config directory.

Linux/Unix:
~/.bzf/

Windows:
C:\My Documentss\My BZFlag Files\
or
C:\My Documents and Settings\<username>\My Documents\My BZFlag Files\

MacOSX:
~/Library/Application Support/BZFlag/

The DownloadAccess.txt controls the servers from which you
may download files (currently only textures, but potentially sounds,
3D models, shaders, etc...) It will be generated if it doesn't exist, and
will initially limit you to the bzflag.org and bzflag.bz domains.
Please edit the file if you wish to have unlimited access. It contains
the documentation for its format, and easy instructions to make the
access unlimited.

The ServerAccess.txt file controls the game servers that the
client can connect to. If you wish to use this feature, then you'l have
to create the file yourself. It is in the same format as the download
access file. If the file doesn't exist, then the client can connect to
all the servers.

P.S. If you do wish to enforce limited access, then making the files
immutable with 'chattr +i' is the way to go on *nix systems. I don't
know what the equivalent mechanism is in windows.


An example with downloaded textures:

http://trepan.bzflag.bz/texdl.jpg

(and yes, the globe spins)

Posted: Fri Feb 18, 2005 10:33 pm
by Scorch
I have some questions;

1. it says "downloading: http://etc.", does the server or the map or what specify the url links to the downloadable textures?

2. can it download folders with textures in them or JUST .png textures (im ruined if its just tex's :/ )

Posted: Fri Feb 18, 2005 10:42 pm
by trepan
BZFlag currently only supports the PNG image format for textures.
Here's an example that uses a remote texture:

Code: Select all

material
  name globe
  texture http://trepan.bzflag.bz/earth.png
end

sphere
  divisions 10
  position 0 0 20
  size 10 10 10
  matref globe
  texsize 1 1
end
P.S. I've got a patch that uses SDL_Image to permit
JPG, BMP, GIF, PCX, PNM, etc... image types, but
it would add another library dependency to BZFlag,
so I haven't committed it.

Posted: Fri Feb 18, 2005 10:44 pm
by Scorch
so if you do a remote texture it'll just run off the webpage and it won't even download onto your machine or will it download it to data and use it as earth.png?

Posted: Fri Feb 18, 2005 10:47 pm
by trepan
The remote files are downloaded into the config cache directory.
They are in the http/ and ftp/ subdirectories. You can setup the
client to automatically download files and/or automatically update
them. You can also set a cache size limit, and force update checks.

Posted: Fri Feb 18, 2005 10:48 pm
by Scorch
when will this 2.0.2 be out most likely? I'd like to release my map with these new features?

Posted: Fri Feb 18, 2005 11:09 pm
by JeffM
http://my.bzflag.org/builds/2.0.x/

there you will find a windows build that has the downlaod code in it. Since its' 2.0.x it is compatable with 2.0.0

have fun with it.

Posted: Fri Feb 18, 2005 11:39 pm
by trepan
NOTE: That build is probably broken for texture downloads.
The windows build was just tested, and some fixes were
added that make it work (since Jeff's posting)

NOTE 2: the 2.0.1b2 build has the fixes

Posted: Sat Feb 19, 2005 12:10 am
by JeffM
yeah yeah yeah, new build is uploaded.

Very nice

Posted: Sat Feb 19, 2005 11:16 am
by sbgodin
I tried. It works.

It works so fine that I can see the Trepan's IP :-)

Very nice work.

Posted: Sat Feb 19, 2005 4:37 pm
by Sir Lance-A-Lot
Is this build compatible with my 2.0 Server command line? Or do I have to change it.

Posted: Sat Feb 19, 2005 5:27 pm
by sbgodin
Sir Lance-A-Lot wrote:Is this build compatible with my 2.0 Server command line? Or do I have to change it.
All seems compatible, except --requireidentify. There some more options as SAY, but your CLI should work.

trying to make this work

Posted: Wed Jun 01, 2005 3:37 am
by tadd
Using bzfs 2.0.2 for macOSX and bzflag 2.0.2 for macOSX
I edited the DownloadAccess.txt file and removed the last 3 lines as indicated. I saved trepan's Code in trepan.bzw and pointed to it with bzfs. It creates a white sphere.
I replaced trepan's http link with one to my own web site and I still see a white sphere.

The BZ client says "downloading: http://... filename..." and then "failure: OPERATION TIMEOUTED"

If I replace trepan's texture line with "texture title" I see the title graphic mapped.


Any ideas as to why the downloaded png files don't work? Thanks.