Access Files and Downloadable Textures

Important stuff goes here.
Post Reply
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Access Files and Downloadable Textures

Post 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)
User avatar
Scorch
Private First Class
Private First Class
Posts: 747
Joined: Thu Sep 30, 2004 12:16 am

Post 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 :/ )
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post 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.
Last edited by trepan on Fri Feb 18, 2005 10:45 pm, edited 1 time in total.
User avatar
Scorch
Private First Class
Private First Class
Posts: 747
Joined: Thu Sep 30, 2004 12:16 am

Post 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?
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post 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.
Last edited by trepan on Fri Feb 18, 2005 10:49 pm, edited 1 time in total.
User avatar
Scorch
Private First Class
Private First Class
Posts: 747
Joined: Thu Sep 30, 2004 12:16 am

Post by Scorch »

when will this 2.0.2 be out most likely? I'd like to release my map with these new features?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post 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.
ImageJeffM
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post 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
Last edited by trepan on Sun Feb 20, 2005 12:17 am, edited 2 times in total.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

yeah yeah yeah, new build is uploaded.
ImageJeffM
User avatar
sbgodin
Private First Class
Private First Class
Posts: 50
Joined: Mon Dec 27, 2004 11:33 pm
Location: France
Contact:

Very nice

Post by sbgodin »

I tried. It works.

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

Very nice work.
Christophe HENRY - France
User avatar
Sir Lance-A-Lot
Private First Class
Private First Class
Posts: 503
Joined: Tue Jun 29, 2004 12:49 am
Location: Amongst my Computers
Contact:

Post by Sir Lance-A-Lot »

Is this build compatible with my 2.0 Server command line? Or do I have to change it.
Image
User avatar
sbgodin
Private First Class
Private First Class
Posts: 50
Joined: Mon Dec 27, 2004 11:33 pm
Location: France
Contact:

Post 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.
Christophe HENRY - France
User avatar
tadd
Master Sergeant
Master Sergeant
Posts: 93
Joined: Sun Aug 22, 2004 2:25 pm
Location: Raleigh, NC

trying to make this work

Post 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.
This is a block of text that can be added to posts you make. There is a 800 character limit
Post Reply