targetting and LOS
Collapse
X
-
My understanding of your original suggestion was that the visibility of a square isn't affected by whether the square itself is a wall or not. Is this no longer the case? If so, what are the different criteria for visibility? If not (which I had assumed) then old #1 and new #1 are identical (I think). -
That's not what #1 meant before. I think I agreed with the prev #1, but not with this. The problem is that some people have made suggestions in which a wall would be visible, but a monster in an empty square at the same location would not be visible. The quote above would make the wall but not the passwall monster visible in such a scenario.Leave a comment:
-
@PowerDiver:
So would it be fair to say you support option #1 (that LOS for a passwall monster works as if it were a regular monster occupying an open square)?Leave a comment:
-
Passwall monsters have to be able to melee from an adjacent wall, for tradition's sake, and also so that a mage-caster cannot make himself invulnerable to passwall monsters' attacks by casting create doors. If a monster can melee you, surely it ought to be able to breathe on you, so they need to be poking out of an adjacent wall. Also, they need to be poking out if you are to be able to melee them. I'd say if they poke out of a wall when you are adjacent, they should still poke out when you are not adjacent..Leave a comment:
-
I've figured a better way of explaining why I like my initial proposal. It would be nice to be able to approximate a single grid square by the point at the center. For visibility purposes, that means that it would be nice if the square that are visible from an edge in the half-plane extending out from the edge are similar to those that are visible from the center.
In the current model, where one sort of assumes that #s fill their entire square, the approximation of a sqaure by its center does not work at the entrance to a room. The following is not exact, but has the flavor of my approach. Imagine the map according to the current system, defining #s to fill their squares entirely. Then shift the grid 1/2 square horizontally and 1/2 square vertically. At this point, grid squares' edges' visibilities are very well approximated by their centers.
The main problem with my suggested method is that an isolated pillar in the old method ought to be describe by a 2x2 set of #s in the new method, and so individual #s give strange properties. This is most important in rooms where a quarter or half of the interior is made of pillars. Of course, in the current model you really should *not* be allowed to step between two diagonally touching pillars, so it is not surprising that the rooms half-filled with pillars would have to be redesigned. Also, in this new model, you cannot describe two pillars whose exteriors are 10' [1 square] apart., but that is in sync with a minimum width of 20' [1 square + 2 half-squares] for a corridor in the model I described.Leave a comment:
-
(EDIT: As in my earlier posts, I am still arguing for the original suggestion, which is what I implemented in loser.c)
Just to be clear, the original suggestion does produce shadows... they just aren't as large or nice-looking as people might want.
If you imagine trying to hide behind a 4-foot diameter tree trunk, it's obviously not casting a huge shadow. And in fact, trying to hide behind it at a distance would be pretty hard.
I'm also not convinced that monsters in walls are hard. There are two options:
1. Seeing a wall square means seeing everything in it. In this case, a monster looking out from it gets the same FOV as if the square were open. Players and death drakes can target each other.
2. Monsters in wall squares are hidden (e.g. not poking out). In this case, the monster's FOV is blocked in all directions, and nothing can target it.
Either way, you maintain symmetry and normal LOS.Attached FilesLast edited by d_m; June 21, 2009, 04:12.Leave a comment:
-
Well I didn't explicitly mention lighting. You can obviously be ambushed if you are in a lighted area and the monster isn't. In a game with instadeath I'm not sure ambushes need much more encouragement than that.Leave a comment:
-
A different solution is to change the dungeon generation code so that single pillars are not created in the first place. If the player chops one out, he would have only himself to blame for a lack of cover.Leave a comment:
-
I think we're all getting a little confused / off track here.
To sum up, "wouldn't it be nice if"
* What you see is what you can hit with a spell (and vice versa).
* What you see can also see you (and vice versa).
* Standing directly next to a pillar should produce an expanding shadow.
* Reasonably fast code can be produced to implement the FOV, etc.
* No 'trick shots' required (or possible) to hit monsters that you can't target directly.
Is everyone agreed on the above (if they are possible)?Leave a comment:
-
That makes sense. And having considered it, I would like to solve the gordian knot as follows: a death drake in a wall far away should not be visible. If he is, then he's basically got the same LOS hack against @ that @ currently has against corporeal monsters with the hockey stick. As you say: it doesn't have to make physical sense, it just has to be good for game play.
I return to my previous position with the caveat that non-corporeal (PASS_WALL) monsters won't be visible unless ordinary monsters (entering a room) would be visible.
EDIT: on the other hand, this whole idea that LOS = targetable means that ESP will be that much more valuable. I'm not sure that this is a good thing...Leave a comment:
-
All of this talk of subgrids makes me think people are missing the perspective of what is hopefully going to get coded in a not interminable timeframe.
The level of granularity is *ONE* grid. That's it. Finer granularities with monsters taking up multiple squares may happen in the distant future, but I sure won't offer to code it.
In the current framework, there are one or two atomic operations. Is square A visible from square B? Is square A targetable from square B? All the talk of subgrids is just about how to implement the primitives, and is not particularly relevant. The only thing that really matters is that the primitives lead to good gameplay.
I think the two primitives should be the same and symmetric, but I suppose that hasn't been conclusively decided. IMO a death drake in a wall that you can see can breathe on you if any death drake in any wall can breathe out of it. I don't see any way to reconcile that with LOS != targetable. In addition, gameplay appears to me to be much better with LOS == targetable.
I see a lot of the discussion as being a cry for finer granularity. IMO it doesn't belong in this thread, which should be about what should be done with the current level of granularity.Leave a comment:
-
PD's suggestion here is excellent. But if we're doing something like this, then there's no need for walls (or monsters, or whatever) to only take up some internal part of each grid square!
The ONLY reason this was suggested was to get around the problem that, based on the OP's suggestion, single pillars would cast no shadow at all. But if we base our new visibility mechanism on PD's idea, this wouldn't happen.
So, here's how the approach would work. Wall segments, and all monsters and items, 'take up' their entire grid square --- there's none of this subdivision stuff. To check whether @ can see an M, we just ask this simple question: if we choose a point at random in @'s grid square, and a point at random in the M's grid square, what's the probability that we can draw a straight line between them, unobstructed by walls? If this probability is greater than some fixed percentage --- I suppose 50% makes sense --- then we say that the @ can see the M.
It's as easy as that! This is simple to explain, and intuitive. Of course, the difficulty is coming up with a good algorithm for calculating the answer quickly --- but that just needs some clever maths, and I'm sure one of us could work that out. We can also use this visibility percentage to modify the chance for ranged attacks to be successful, lower visibility percentages making a successful hit less likely, in the way someone suggested earlier in this thread.
We could always simplify this procedure, at which point it starts looking much more similar to PD's original idea. For example, we could check just 16 distinct lines:- from the bottom-left corner of the @'s square to the bottom-left corner of the M's square;
- from the bottom-right corner of the @'s square to the bottom-left corner of the M's square;
- from the top-left corner of the @'s square to the bottom-left corner of the M's square;
- from the top-right corner of the @'s square to the bottom-left corner of the M's square;
- from the bottom-left corner of the @'s square to the bottom-right corner of the M's square;
...- and from the top-right corner of the @'s square to the top-right corner of the M's square.
If more than 8 of these 16 lines are unblocked by walls, we could then say that the @ and the M have line-of-sight. I've attached a picture of the shadow that this produces behind a single pillar, the orange square. The lightness of the other squares is given by proportion of the square that's visible from the @, calculated using the 16-line method.Last edited by jv123; June 20, 2009, 23:40.Leave a comment:
-
Given that each grid contains a 5x5 sub grid, instead of the previously discussed 4x4... (asterisks represent blank space)
Code:***** < player ***** < horizontal *###* < corner *@@@* ##### wall *###* *@@@* ##### ####* *@@@* ##### ####* ***** ***** *****
Code:tiny medium man giant massive ***** ***** ***** *@@@* @@@@@ ***** **@** *@@@* @@@@@ @@@@@ **@** *@@@* *@@@* @@@@@ @@@@@ ***** **@** *@@@* @@@@@ @@@@@ ***** ***** ***** *@@@* @@@@@
EDIT: According to my calculations, a standard 1x2 hockey stick would work both ways.
a 1x3 hockey stick would be a border-line LOS situation for the person standing nearest to the corner. The other would have a clean shot.
a 1x4 hockey stick would yield no LOS for the one nearest the corner, and yet still a clean shot for the other.
I'm not really liking my own idea anymore.
All 'calculations' preformed visually, not mathematically, so my 'numbers' may be a little off.Last edited by buzzkill; June 20, 2009, 22:14.Leave a comment:
-
[QUOTE=Pete Mack;20870]
Eddie, this doesn't make sense. Walls will always fill an arctangent-1 of LOS, because their surface is a straight line. The issue is whether the monster is (almost) flush with the surface. If he fills some fraction of the square, there will be some distance beyond which you will be mutually out of LOS.
I made that explicit with my initial description that walls extend half-way and the monsters are at the center, but taking up the center 4 of 16 sub-squares works too. IMO anything that changes this will turn out, after due consideration, to be broken in some way. In that diagram, you really don't want the M to be targetable if it is a death drake in a wall [that breathed at you last turn], but not targetable if it is a death drake in an empty square.Leave a comment:
Leave a comment: