targetting and LOS

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Atanvarno
    replied
    This system allows the player to see very much, even more than the digital field of view (http://roguebasin.roguelikedevelopme..._field_of_view):

    Code:
      %%%%#%%
      %  .   
     %% ###%%
     % ...#
    ##....#
    @.....#%%%%
    ##........#%
     % ...###...
     %  ..# %%%%
     %%%%##
    Here % is a hidden wall.

    Digital fov is symmetric and has the following nice property:
    if A can see B, then A can see everything between A and B.

    This new system has the following slighty weaker property:
    if A can target B (with the old method), then A can see everything between A and B.

    In the traditional system this is not true:
    Code:
    ###X.B
    A.....
    Here A can't see X, but a shot fired at B hits X.

    Roguebasin contains articles on different fov systems, and a comparison of them: http://roguebasin.roguelikedevelopme...ield_of_Vision.

    Leave a comment:


  • jv123
    replied
    Also, Paul, I don't see how your system can be symmetrical --- compare your pictures in posts #33 and #35; they clearly don't describe symmetrical behaviour.

    Could you explain exactly what your suggestion is? You wrote
    1. Pillars take up half the square.
    2. Pillars are square.
    3. Any square you can see at least half of you can "see" less than that and you can't see them.
    but I don't get exactly what you mean. In particular, I'm confused by your point 1 --- we had been discussing the suggestion that pillars take up a quarter of the area of a square, but placed at the centre, i.e. the central 2x2 squares of a 4x4 subdivision.

    Leave a comment:


  • jv123
    replied
    Paul --- I love the picture!

    But actually I think it would be LOS under my suggestion (or at least it would be if I had worded my suggestion clearly).
    Unless I'm mistaken, the problem doing it the way you suggest is that it would lead to weird shadows behind pillars, like this, where the gaps are the only invisible grid squares:
    Code:
    ...........
    .@.........
    ...#.......
    ..... .....
    ....... ...
    ......... .
    ...........
    It wouldn't be crazy to have this behaviour, but I think cone-shaped shadows would be more realistic.

    MarbleDice said:
    if I'm standing at the thresh hold I probably couldn't see someone standing in one of the near corners ... I think I'd be fine with no LOS in Eddie's example. ... Also for very long corridors you wouldn't be able to see what's coming around the corner until it had stepped around the corner, or you were pretty close. I'm fine with that too as long as it's symmetrical.
    I agree. Using the centre-to-centre rule, and the rule that walls only conceal the middle quarter of their grid square, this would be the limits of visibility around a corner:
    Code:
        #.#    
    #####@#
    ..M...#
    #######
    These two would NOT be able to see each other, because the centre-to-centre line passes exactly through the corner of the wall, and so would be classed as blocked.
    Last edited by jv123; June 19, 2009, 18:02.

    Leave a comment:


  • PaulBlay
    replied
    This is what my suggestion would look like when entering a large room (green is visible).

    I'm pretty sure it's symmetrical. (Obviously we can do the actual maths on this instead of just moving lines on Excel)
    Attached Files

    Leave a comment:


  • Marble Dice
    replied
    As long as it's symmetric, I think we'd be fine.

    Thinking out loud here, it makes a certain amount of sense that if you are inside of a rectangular room, you can see anyone standing at any door into that room. Assume LOS is symmetrical, so that would mean anyone standing at a door to a room could also see anyone standing inside the room. This second point makes a little bit less sense, especially for very large rooms - if I'm standing at the thresh hold I probably couldn't see someone standing in one of the near corners, unless I was actually inside the room myself.

    So I think I'd be fine with no LOS in Eddie's example. If the person inside the room is close to the middle, or the person at the door is actually one square inside the room, then you'd have LOS and that makes sense to me. If you've got no LOS then the parties involved are basically hiding in corners and doorways.

    Also for very long corridors you wouldn't be able to see what's coming around the corner until it had stepped around the corner, or you were pretty close. I'm fine with that too as long as it's symmetrical.

    Leave a comment:


  • PaulBlay
    replied
    [QUOTE=PowerDiver;20792]The suggested changes would make the following situation *not* LOS.

    Code:
    ######################M
    @
    Frankly I think targetable / LOS at that distance is just greedy. ;-)

    But actually I think it would be LOS under my suggestion (or at least it would be if I had worded my suggestion clearly).

    As you can see 1/4 of any wall cell is clearly visible at any distance.
    Attached Files

    Leave a comment:


  • jv123
    replied
    There's clearly no way of implementing symmetric LOS that gives realistic cone-shaped shadows behind pillars, and which also makes monsters visible in the above situation. Cone-shaped shadows behind pillars are essential, because the alternatives are line-shaped shadows, which are unrealistic and which work poorly when you're not in a horizontal or vertical line from the pillar, or no shadows, which would be ridiculous.

    So, I would argue that the monster should indeed not be visible in the situation you've just described.

    Leave a comment:


  • PowerDiver
    replied
    The suggested changes would make the following situation *not* LOS.

    ######################M
    @


    I don't know whether that is a good thing or a bad thing. I can't find it in this thread, but someone posted somewhere about going to the effort to code to make that targetable, so it's certainly not unanimously considered good.

    Do we want to change to make something currently visible change to non-visible?

    Leave a comment:


  • jv123
    replied
    what's wrong with just checking center-to-center? Wouldn't you only need to use the central 4-squares for checking obstruction from a wall?
    You're quite right --- simpler is better, and I can't see any problem with just checking the centre-to-centre line. Centre-to-centre would allow you to see the monster in this situation, which is the most important thing to make sure of:
    Code:
    ......
    ..@...
    ###...
    ###M..
    I do like the idea of 'partial visibility' for monster right at the edge of what you can see, but I agree it's not a necessary part of the proposal.

    Leave a comment:


  • Marble Dice
    replied
    Originally posted by jv123
    In other words, it's not good enough to check to see if you can see any of the monster's 4 central squares from the precise centre of your grid square --- this wouldn't give a symmetrical condition
    This is true, but what's wrong with just checking center-to-center? Wouldn't you only need to use the central 4-squares for checking obstruction from a wall?

    Originally posted by PaulBlay
    Yah, but that wouldn't account for the "ghost in the wall" scenario.
    Is this really a scenario that needs accounting? Why can't enemies in visible tiles just always be visible, regardless of if they're a hydra in the open or a ghost inside a wall? If you can see the wall, then you can see the ghost inside it.

    Leave a comment:


  • jv123
    replied
    This brings up the possibility of some extra fun stuff --- it a monster is right on the edge of your visibility cone, and you fire a bolt spell or arrow, there could be a chance of getting the message "Your missile glances off the wall!" and the attack missing. This would penalize you for staying right on the edge of your visibility cone, from where escape is easier. Of course, monsters would also have this penalty when firing at you.

    Here's how this could be calculated: we're subdividing each grid square into 16 smaller squares, and imagining that the monster occupies the central 4 squares. If you can only see some proportion of these squares, then your chance to hit the monster is reduced by the appropriate fraction. Maybe there could be a dex-related chance of ignoring this penalty: after all, if you're really good at aiming, you only need to have line-of-sight to a small point on the monster to be able to deliver a fatal shot.

    Note that for this to be symmetrical, you need to ask "can I see any of the monster's 4 central squares from any of my 4 central squares?" In other words, it's not good enough to check to see if you can see any of the monster's 4 central squares from the precise centre of your grid square --- this wouldn't give a symmetrical condition, and I get the impression that symmetry is generally desired.
    Last edited by jv123; June 19, 2009, 16:22.

    Leave a comment:


  • PaulBlay
    replied
    Originally posted by Marble Dice
    I agree with jv123, if you sub-divide each tile into 16 smaller pieces (4x4), consider each wall to take up the middle 4 (2x2). Then if you can draw a line from tile center to tile center without crossing an obstructed portion of a tile, you have visibility. It would look something like this:
    Yah, but that wouldn't account for the "ghost in the wall" scenario.

    Now if we allowed any square that you can see at least 1/4 of (instead of 1/2) then it would (oddly) make rather little difference but would allow for you to see monsters in walls.

    Code:
    #################
    #................
    #.........
    #@.#
    #.........
    #................
    #################
    You only need to see 1/4 of the square, not 1/2 case.

    Leave a comment:


  • Marble Dice
    replied
    I agree with jv123, if you sub-divide each tile into 16 smaller pieces (4x4), consider each wall to take up the middle 4 (2x2). Then if you can draw a line from tile center to tile center without crossing an obstructed portion of a tile, you have visibility. It would look something like this:

    Code:
    #######.#######
    #######@#######
    ????.......????
    ?.............?
    
    ................?
    .........????????
    .@.###?????M?????
    .........????????
    ................?
    
    @...........
    ...#?.......
    .....????...
    .......?????
    .........???

    Leave a comment:


  • jv123
    replied
    Looks good to me!

    Am I right in thinking that as Angband works at the moment, it's more like this:
    Code:
    ###############
    #..............
    #..............
    #@.#
    #..............
    #..............
    ###############

    Leave a comment:


  • PaulBlay
    replied
    I did some testing with the following assumptions:

    1. Pillars take up half the square.
    2. Pillars are square.
    3. Any square you can see at least half of you can "see" less than that and you can't see them.
    4. People don't care that I'm doing this by eye. ;-)

    Code:
    ###############
    #........
    #.....
    #.@#
    #.....
    #........
    ###############
    This is what you could see standing straight behind a pillar.

    Code:
    ###############
    #..............
    #........
    #@.#
    #........
    #..............
    ###############
    Standing one grid further away.

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎