Sightlines problems

0 views
Skip to first unread message

Wolff Dobson

unread,
Apr 22, 2007, 12:36:31 AM4/22/07
to lg...@googlegroups.com
http://www.lggwg.com/images/sightlinesProblem.png

I've made an image showing what the conceptual problem is.

Let's assume fog of war is on. Thus, in the left example, the red
puffer is out of sight. In the right example, everyone is visible.

Let's say that the blue Snipey is shooting the red Snipey in both
examples. The bullet path(s) are marked by yellow squares. The red
line is the conceptual bullet path (drawn in shaky hand). You can see
it passes through the puffer's square.

The blue line indicates visibility, and you can see the puffer is
clearly invisible in the left case, and blocked by the Max in the
second case.

Now, red snipey shoots blue snipey. Since the puffer is invisible,
the "blindfire" rules kick in. This means you can't hit squares you
can't see, even if the bullet theoretically passes through them. This
means the puffer's square is simply removed from consideration---it
didn't pass through it, or we can assume the Puffer was cowering in
the corner and hiding. Thus, you'd be able to tag the red Snipey
despite the puffer being along the sightlines. Red player gets mad
and sends me a bug report. :-)

In the right case, there is no blindness. In that case, the puffer
will take the hit instead. If the blue Snipey were taking an opp-fire
shot, it would NOT choose the puffer as its target (since it's blocked
by the Max), but it WILL take the shot on the Snipey and hit the
puffer instead. It looks a little odd, but I bet no one notices since
it looks like a marginally legal shot with the lights on.

So, basically, same setup, different visibilities, different behavior.
Obviously, people aren't very pleased with it, but...what do you do
instead? Here are two principles:

1. You can't shoot squares you can't see. It's been abused badly, and
I don't like what it does to the game. The game originally didn't
have blindfire rules and this blindfire thing got to be
abused---people were using it constantly to smack people around
corners and it detracted seriously from the fun of the game.

2. It should be clear what happened. Otherwise I get bug reports.

Solutions:

1. The Puffer Is Always Missed. In this case, we push in the
collision detection hull a little and let corners off the hook. Most
of the units are sort of round, right? However, this means in
well-lit areas you can see people taking some pretty crazy shots
between the ranks. I don't think I like this.

2. Recall The Shot For Intermediate Target: When you take the shot,
we trace the path. If you hit an intermediate target, act as if this
were your ACTUAL target and recalculate the path. In this case, on
the left, if you targeted the red Snipey you'd shoot the wall and on
the right you'd shoot your own Max (as you'd be following the blue
line). One could imagine having a psychic opp-fire calculation that
looks at both of those cases and says, no, that will be bad, and
doesn' t take the shot.

3. The Invisible Puffer Ducks: I make the some sort of signal to the
target player for when its puffer "ducks" by dint of being invisbile.
So, the in the left case, the puffer gets an icon over it that says
"DUCK!" when the bullet goes by, or I (ye gods more art) draw a
ducking position to indicate the shot missed. So, the invisible
player will say, ah, I see why I got tagged, and the shooting player
remains unaware of the puffer. In the right case, I'm not sure what
happens.

I'm open to any other suggestions.

The drawing also indicates a black sheep shooting at the puffer. I
can't remember why that was important. I'm sort of sleepy.

Thanks,
Wolff/Dan

----
Note: The doors at the bottom of the map were required by Kate, my
3-year-old daughter. As I was working on the drawing, she kept asking
me how the guys were going to get out, and I told her that's the
problem, they can't get out. That's why they fight.

She said, "You need to make a door." So I put doors in, and then she
said, "But how are they going to get past the sheep?" I said I wasn't
sure---maybe they'd lift the sheep over their heads and walk under it
or something.

She smiled. "They'll play tollbooth!" which is one of Kate's favorite
games. I imagine the sheep will be demanding pretend money of the
troops as they walk by.

Ian Hickson

unread,
Apr 22, 2007, 12:55:06 AM4/22/07
to lg...@googlegroups.com
On Sat, 21 Apr 2007, Wolff Dobson wrote:
>
> Solutions:
>
> 1. The Puffer Is Always Missed. [and you can shoot through ranks]
>
> 2. Recall The Shot For Intermediate Target: [and you can shoot people
> that you couldn't target if you weren't trying to shoot further away]
>
> 3. The Invisible Puffer Ducks: [same as 1, but with obvious ui]

>
> I'm open to any other suggestions.

How about changing the line of sight calculations? Make it so that any
square you can reach by drawing a line from the center of the shooter
square counts as visible, even squares that you can only graze. Then make
the squares that you can target be any squares that you can see at all.

You could have some sort of "there's someone in this square but I don't
know who" state for squares you can't see more than half of, maybe.

Or make it that there are two levels of squares, "fully visible" and
"parly visible", and if you shoot someone in the "partly visible" square,
then you do half damage.

--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'

Magnus Kristiansen

unread,
Apr 22, 2007, 9:11:34 AM4/22/07
to lg...@googlegroups.com
On Sun, 22 Apr 2007 06:55:06 +0200, Ian Hickson <i...@hixie.ch> wrote:

> How about changing the line of sight calculations? Make it so that any
> square you can reach by drawing a line from the center of the shooter
> square counts as visible, even squares that you can only graze. Then make
> the squares that you can target be any squares that you can see at all.
>
> You could have some sort of "there's someone in this square but I don't
> know who" state for squares you can't see more than half of, maybe.
>
> Or make it that there are two levels of squares, "fully visible" and
> "parly visible", and if you shoot someone in the "partly visible" square,
> then you do half damage.

The problem at the moment, as I see it, is that the requirements for
targetting someone are not the same as for hitting them. To target someone
you need a free line to the center of the tile, but during a shot you can
pass any part of the tile to make a hit (as long as you see it, otherwise
blindfire kicks in).

The solution, as I see it, is to remove this distinction. You should not
have to aim at something other than your target to hit (except when using
splash, of course). So here's my take on it.

1a. Guys are not square, so they don't occupy the corners of tiles.
1b. Walls, doors, and other square things are square.
2a. A direct shot targets the "center" of the target tile. That's where
the guy is.
2b. Sight targets the same "center" of the tile. If you can't see the
"center", you can only see the parts of the tile where the guy isn't
standing, so you don't see him.
3. When a shot is made, it can only hit on the tiles where it passes
through the "center". When it passes through outside the center, it only
grazes the guy. It cannot pass through any part of a square object.

Thus, a shot can only hit tiles where it passes through the center. Any
tile where you can hit the center can be targetted, and also seen. Thus
you can only hit targets you can both see and target.

Exactly what part of the tile makes up the "center" is up for definition.
The best would probably be to set up a few testcases like the OP image and
decide whether those should be inside or outside. Intuitively, I would
suggest a diamond with vertices on the midpoints of each tile edge, as it
shouldn't make the calculations too complex. An even easier fix would be
to say the center is the entire tile, not sure about the resulting
behavior though.

--
Magnus Kristiansen
"Don't worry; the Universe IS out to get you."

G Lu

unread,
Apr 22, 2007, 1:45:53 PM4/22/07
to lg...@googlegroups.com
So in the situation on the left, can the red snipey shoot the blue one without hitting his own puffer?  From what I'm understanding, it sounds like the answer is no, meaning even if the red player had two snipeys, neither would be able to shoot the blue guy.  If this is the case, then I'd say that if the blind fire rules kick in when an attack is reversed, then the attacker should omit the same spaces that the defender would.

With that exception, I think the current behavior is acceptable.  The only problem I see is that calling it a dodge makes it sound like the dodging unit had a choice in the matter.  Someone's eventually bound to ask, "Why did my guy dodge?  He should have taken the hit for my Exec!"  I think it'd be all right to just put up a "grazed" sign and define its purpose and meaning in Ye Olde Player's Manual.

One thing to consider about this whole visibility versus shootability thing is a purely defensive unit.  I thought Wolff was talking about adding a mobile hardened unit.  Suppose we replace the puffer in the left image with this guy.  If he blocked line of sight, then he would intercept the shot but obscure the blue player from seeing any other units, which may or may not be desirable.  If he didn't block line of sight, then I feel like it should ignore the blind fire effect.  Otherwise it's not as useful in a tight, twisting corridor where I would think a shield should be useful.
Reply all
Reply to author
Forward
0 new messages