Page 1 of 1

Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 10:56 am
by 808ethan
I'm running a loop

for (int i = 0; i < numFlags; i++) {
Flag& flag = World::getWorld()->getFlag(i);
}

and it reports all non-team flags as PhantomZone. Once a tank picks up a flag, it registers as its true flag type, but this makes it impossible to pick a flag you want and chase after it.

Is this the desired behavior? Is chasing after a particular flag type cheating? Or am I making a mistake somewhere in my code?

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 11:21 am
by blast
Adding that kind of feature would be cheating. And yes, that is an anti-cheat mechanism. What exactly are you trying to do?

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 5:48 pm
by JeffM
The behavior you are seeing is intended.

We specifically made the client treat all flags as PZ until pickup. This was done to prevent cheating. The Identify flag is the feature that tells a client what the nearest flag is. If the client knows all the flags anyway then there is no benefit to that feature. So all flags were made anonymous and a message is sent to the client saying the name of the nearest flag when they have Identify. This makes the server authoritative for the feature.

so in short, No, you can not find out what all the flags are from the client only the server knows that.

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 5:50 pm
by 808ethan
Ah, were doing a robot tank competition. We all seemed to think this would be an essential strategy. If its not possible then no one will show up with it and that's one less thing we have to program.

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 6:12 pm
by JeffM
The human players don't know what the flags are, so the robot players should not know it ether, so I don't see how it's something that you would have to program at all. When a tank drives over a flag it will get a message about what flag it has picked up.

This is required to make "bad flags" work. If people knew it was bad before you picked it up, nobody would ever hit them.

You should be emulating a human player, so it would have the same input as a human.

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 7:05 pm
by dang dizzy white
We could argue how the Identify flag is more or less useless, and how it should cover all the flags globally, but JeffM more or less hit the spot there. Unless the map has Zones set for specific flags to spawn in known locations, random flag hunting is based on luck. Furthermore, if a map includes bad flags (although that is rare nowadays), they wouldn't be picked up by anyone at all.

On short, getting a good flag on a random location spawning map was meant to be based on luck, there is not much point in trying to overcome it. Unless... You start your own map and release a specific plugin that could trick the system. However, that's another story.

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 8:45 pm
by JeffM
No, there is no arguing it. How Identify works is how it's supposed to work by design.

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 10:10 pm
by dang dizzy white
Read my post again. I said that we could argue about its actual in-game usefulness, not its functionality.
It doesn't matter what it was meant to do since the creation, a weak flag is a weak flag.

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 10:32 pm
by blast
Sub wrote:Read my post again. I said that we could argue about its actual in-game usefulness, not its functionality.
It doesn't matter what it was meant to do since the creation, a weak flag is a weak flag.
Perhaps you should read your post again. You specifically talked about the functionality of the flag in that same sentence.
Sub wrote:We could argue how the Identify flag is more or less useless, and how it should cover all the flags globally

Re: Possible to View Flags on Ground?

Posted: Tue Dec 03, 2013 11:06 pm
by JeffM
Yes you talked about changing it's functionality, we will not be doing that. It may not be useful for your personal play style but it is for others. Not all flags are well suited to all people.

Re: Possible to View Flags on Ground?

Posted: Wed Dec 04, 2013 5:45 am
by dang dizzy white
No, you just misunderstood. By hinting on how changing the functionality (never said to do it, though) I wanted to point out that the power the flag currently (and most likely always) brings is weak. You cannot argue that knowing all the flags on the map and where they are located would only bring me profit if I would be one of the flag holders, because that's not true. By that, I wanted to clear a possibility of why the OP would even want that in the first place.

In the end, the functionality was not the thing I was focusing on, but I have used it in order to tell how useless the flag really is. After all, how would you do it otherwise? I've pointed out the case in which the flag would be more useful, and this was all there only to clear the possible reason why the OP went into coding for this in the first place.

All in all, the part of my post you two have just focused on was meant to be the most minor, but you have still done it. I was never suggesting a change, and probably never will.

Re: Possible to View Flags on Ground?

Posted: Wed Dec 04, 2013 3:41 pm
by slime
@Sub - I find the Identify flag very useful. There's only one type of flag that I consider USELESS when I pick it up. Can you guess what that flag is?

@808ethan - If the members in your competition do want to use choosing certain flags as a strategy, as Sub already mentioned, you can use flag zones in your map. Check this link for more info: http://wiki.bzflag.org/Zone

Re: Possible to View Flags on Ground?

Posted: Wed Dec 04, 2013 4:32 pm
by dang dizzy white
I think I can. ;)

I do not want to hijack the thread with Off-Topic comments, but I would like to ask, just how do you find Identify useful?
You have to get really close to a flag in order to see what type it is. What difference does that make over just digging through them all on the spot, and keeping the one you want? (Assuming there are no bad flags)

The one situation where I would find this useful would be if the map would be extremely big, with randomly generated spawns, and all flags having an auto-up after the drop/death with it.
Auto-up is reasonable why, because if out of those flags you would drop your favorite, it would teleport away. However, many times on normal sized maps (size = 800), the Identify flag is just too time consuming if you want to turn around and go back to pick up the flag you preferred. Usually, the dig-through and walking to the other side of the map swiftly (you can see where the flag that you dropped landed on radar) proves more efficient. That brings the conclusion that if you are an advanced player, ID can be as good as US.

Re: Possible to View Flags on Ground?

Posted: Thu Dec 05, 2013 4:22 am
by slime
It is useful for me in clusters of a lot of flags. With Identify, i can go in a group of 3-4+ flags, move my tank a very small distance, and it will flash through the names of all those flags near me in the cluster very quickly. Maybe this is just useful for me since I have my flag drop button in a position on my kb where i have to move my hand to reach (there is a specific reason I do this). Using Identify is a whole lot quicker for me, and we know how important a extra time is when someone with geno is approaching.

Re: Possible to View Flags on Ground?

Posted: Thu Feb 27, 2014 4:06 am
by ZE BOZZ
slime wrote:@Sub - I find the Identify flag very useful. There's only one type of flag that I consider USELESS when I pick it up. Can you guess what that flag is?
And now on some servers (where we've added the plugin) even the Useless Flag isn't so useless. Mines are a great development. :D