Map Textures

All things BZFlag - no [OT] here please
Post Reply
happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Map Textures

Post by happyhad » Tue Apr 18, 2017 6:02 pm

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 http://images.bzflag.org/submitimages/ 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

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5187
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Re: Map Textures

Post by JeffM » Tue Apr 18, 2017 7:48 pm

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.
ImageJeffM

happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Re: Map Textures

Post by happyhad » Wed Apr 19, 2017 2:34 pm

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:
map.bzw
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:

material
name court
addtexture tex
color yellow
end

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



Hopefully that clarifies.
Thanks for replying!

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5187
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Re: Map Textures

Post by JeffM » Wed Apr 19, 2017 7:39 pm

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.
ImageJeffM

happyhad
Private First Class
Private First Class
Posts: 18
Joined: Wed Oct 21, 2015 7:58 pm

Re: Map Textures

Post by happyhad » Fri Apr 21, 2017 2:53 pm

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!

User avatar
blast
General
General
Posts: 4780
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Map Textures

Post by blast » Fri Apr 21, 2017 3:11 pm

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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

Post Reply