Page 1 of 1

Map Textures

Posted: Tue Apr 18, 2017 6:02 pm
by happyhad
I have a BZflag LAN game that runs at work.
I have dabbled in making maps and am trying to add a texture to a box.
I believe I have it correct at the map making level. But I keep getting "cannot load texture: {texture name}" at the client level.

I have seen about but do not want to do that as this is at work.
Can someone shed some light on how to get the client to load textures?
I am ok with adding them to users clients manually for our LAN purposes.
I tried hacking textures into the cache folder without success.
It just a plain old .png file file correct? Is there some special formating or anything.

Thanks for the help

Re: Map Textures

Posted: Tue Apr 18, 2017 7:48 pm
by JeffM
Yes, it's a regular png file.

You can edit the DownloadAccess.txt file on the client machines to allow downloads from any host you want.

allow * will let it pull from anywhere.

Re: Map Textures

Posted: Wed Apr 19, 2017 2:34 pm
by happyhad
I tried that but it did not work. But maybe I should explain in more detail.
I am on Windows. So on my computer in C:\BZMap I have the following:
config.txt (which calls for map.bzw)
tex.png (which is called by a material and mapped to a box in map.bzw)
I launch the client and connect to localhost. This works fine and I am able to play but I get the error "cannot load texture: tex"

So first off I am in testing stages of this map. So I am fine to manually place the PNG's somewhere on my computer just to test the process.

If I do go to "production" on this map. I would place it out on our BZ "server". This is all within our LAN, so I don't want to put textures out somewhere in the cloud.
Am I correct in assuming that I would put the .bzw and the textures in the same folder on the LAN server, and it would download them (assuming the clients change the DownloadAccess.txt)?

I am also fine with emailing our players and saying "hey put these .PNG's in some folder on your computer so the map looks right", if that's what needs to be done.

Also just in case I am doing something wrong from the .bzw perspective:

name court
addtexture tex
color yellow

position -75 0 0
size 1.00 152.50 .05
matref court

Hopefully that clarifies.
Thanks for replying!

Re: Map Textures

Posted: Wed Apr 19, 2017 7:39 pm
by JeffM
BZFS itself can't host the image to another computer, the image must be hosted on a web server and the download URL be part of the map. That webserver can be LAN only, but it must still be a webserver.

it may be possible to put the images on a network share and use a file:// style URL with the path to the share, but that is untested.

You can have them put the PNG files in the install dir too, same place as the other files.

Re: Map Textures

Posted: Fri Apr 21, 2017 2:53 pm
by happyhad
Well I've put that PNG in almost every folder I can think of and still get the same error.
Oh well. Just seems like you could dump them somewhere in appdata folder and it would read them.

Thank you for helping!

Re: Map Textures

Posted: Fri Apr 21, 2017 3:11 pm
by blast
If you're intending to not use HTTP to access map textures, then they need to go into the data folder where you installed BZFlag. But it's easy enough to just run a little web server to host the images and update the DownloadAccess.txt to allow it.