How Does a Server Allocate Flags Without "zoneflag"?

Questions and answers about the how and why of making maps.
Post Reply
User avatar
Agatha
Private First Class
Private First Class
Posts: 26
Joined: Thu Jul 13, 2017 2:20 am

How Does a Server Allocate Flags Without "zoneflag"?

Post by Agatha »

Hi,

For example, if you "/saveworld" on Two Tanks, the resulting ".bzw" file has empty zones (i.e., lacking "name" and "zoneflag"):

Code: Select all

zone
  position 466.5 -735 0
  size 50 50 0
  rotation -60
end
By examining a version of Two Tanks on the forums (a previous version, it seems), we can see that this zone is supposed to be used for defining flags:

Code: Select all

zone
name FLAG ZONE
   position 466.5 -735 0 
   rotation -60
   size 50 50 0
   zoneflag L 10  
end
What's going on in the first case? How does the server know what flags to put there? Is is possible to get this information somehow?

-A
-> Stagnation is playing the same map for literal decades. Take down Apoc/Urban/HiX/Duc!
-> "It takes losing a lot to learn how to win a little bit." / My guide to strategy.
-> My statistics and avatar artwork.
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: How Does a Server Allocate Flags Without "zoneflag"?

Post by blast »

The BZFlag server (bzfs) lets you add flags via the +f option, which explicitly adds specific flags, and via -s, +s, and -f, which let you spawn between X and Y flags (with X being the low number specified via -s, and Y being the high number specified by +s) of random types, except for types prohibited by the -f option. With -s/+s, when the flag respawns, a new flag type will be picked.

(Also, just some info, but you can't download maps from other servers and just use them without permission. Not all maps are open-source licensed. Additionally, the output of /saveworld is far inferior to the original map file since the client never receives the actual map, only a representation of the objects.)
"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
User avatar
Agatha
Private First Class
Private First Class
Posts: 26
Joined: Thu Jul 13, 2017 2:20 am

Re: How Does a Server Allocate Flags Without "zoneflag"?

Post by Agatha »

I guess my question was more how the official Two Tanks server could know which flags go where if the zones don't list them. Flag types are not equally distributed between zones. But, if "/saveworld" doesn't actually use the server's ".bzw", then that would explain this.

(Noted. In this case, since stive put Two Tanks up on the forums for experimentation, I should think it's acceptable to use it for learning how to set up a server. But indeed, hosting a version publicly seems dubious, and I wouldn't do it without asking him.)
-> Stagnation is playing the same map for literal decades. Take down Apoc/Urban/HiX/Duc!
-> "It takes losing a lot to learn how to win a little bit." / My guide to strategy.
-> My statistics and avatar artwork.
User avatar
alfa1
Private First Class
Private First Class
Posts: 168
Joined: Tue Dec 04, 2012 10:21 pm

Re: How Does a Server Allocate Flags Without "zoneflag"?

Post by alfa1 »

As I understand, JeffM's words are saying that anyone is free "to reuse and host" 2 Tanks since it is published on forums and does not indicate any licenses*. Correct me if I am wrong (or correct JeffM's topic if it is not legally right).

In the other hand, as blast said, saving the world from within the client is responsibility of both the server owner and the player (they have to deal with it).

* "By posting the map here you are giving anyone the rights to reuse and host the map, without any other restrictions (...) If you just want to let anyone use your map in any way (host, play, modify, etc.. ) then the simplest thing is to just say it's public domain. Then it's clear you don't care what people do with it. This how we will assume works with out a specified licenses are licensed (...) If there are any maps hosted by authors that do not agree to these terms, then the authors should remove the maps."
(viewtopic.php?f=64&t=10575 .)
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: How Does a Server Allocate Flags Without "zoneflag"?

Post by blast »

You can't assume a license. It either has one, or it doesn't. If it doesn't have a license, no rights beyond what traditional copyright law provides are given to the general public.
"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
User avatar
Agatha
Private First Class
Private First Class
Posts: 26
Joined: Thu Jul 13, 2017 2:20 am

Re: How Does a Server Allocate Flags Without "zoneflag"?

Post by Agatha »

I think what alfa1 is saying is that forum policy explicitly states that posted maps become public domain. This is a perfectly fine policy; copyright in this case is considered to be voluntarily ceded by the copyright holder, in countries where public domain legally exists. Since Two Tanks was posted on the fora, Two Tanks is now public domain.

However, this policy was formally stated after stive was AFAICT last seen on the fora, and (despite the retroactive application to the forum policy), I think it's probable stive hasn't seen it (and any legally required grace period for removal has surely lapsed). Artists typically want widespread enjoyment of their works (particularly if initially released for free), so it's likely stive would want Two Tanks to be public domain. Nevertheless, I don't think it would be particularly nice to assume this to be true and act on it, without his explicit assent (he hasn't responded to a PM, so it's doubtful we'll ever get such; too bad).

Consequently, I haven't publicly mirrored Two Tanks. Despite the fact that it is public domain, I have decided to only use it for experimentation, since this is the only thing we can currently be sure stive wanted.
-> Stagnation is playing the same map for literal decades. Take down Apoc/Urban/HiX/Duc!
-> "It takes losing a lot to learn how to win a little bit." / My guide to strategy.
-> My statistics and avatar artwork.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Re: How Does a Server Allocate Flags Without "zoneflag"?

Post by optic delusion »

It looks to me that the zone was a leftover that the mapper forgot to remove.
It does not appear to do anything. It has no attribute.

The Zone object
Specifies a certain range in the world, and what attributes that range has.

zone
name example_zone
position 0.0 0.0 0.0
size 1.0 1.0 1.0
rotation 0.0
# where players may spawn
team 0 1 2 3 4
# where flag may spawn
flag GM SW good bad
# dropped team flags will fly to the closest safety zone
safety 1 2 3 4
# attach a flag to this zone (always spawn in this zone)
zoneflag GM 3 # type, count (type can be a team flag, ex: R*)
end
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Post Reply