Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old June 20, 2009, 01:30   #61
etaomyx
Rookie
 
Join Date: May 2009
Location: Australia
Posts: 17
etaomyx is on a distinguished road
Quote:
Originally Posted by d_m View Post
According to the program I wrote (which had a bug that I just fixed, and probably has more) there are no disconnected visible squares:

Code:
xx####
xx?x.#
xx.!.#
xx#..#
##...#
#@...#
######
Hmm, so we differ on the tile I marked ?. But the slope of the line between the centers of @, ? is 16 / 4 = 4 / 1. And the slope of the line connecting @ with the lower-right-hand corner of the wall directly above @ is 3 / 1. So any tiles with a steeper slope than 3 / 1 should be obscured. Surely that means ? is not visible?

EDIT: Oops, we also differ on !. But the slope to ! is 3 / 2, which should be blocked by the wall two square up, one square right, which obscures tiles between 9 / 3 and 7 / 5?

Last edited by etaomyx; June 20, 2009 at 01:38.
etaomyx is offline   Reply With Quote
Old June 20, 2009, 01:59   #62
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Here's the diagram again:

Code:
xx####
xx?x.#
xx.!.#
xx#..#
##...#
#@...#
######
As I understand it, based on Eddie's description, the wall tile just north of @ only extends halfway (just to the center point and not beyond); thus, any squares east of straight-north will not be blocked by it. Since the north-east column is a single point with no area, it will only block squares along an exact slope (the x between ? and !).

Thus, since ! is no on the direct line between @ and the column, it is visible. And since the ? is east of the northern wall, and not on the exact diagonal of the column, it too is visible.

To be clear: this is not the suggestion to make each tile into a 4x4 grid and use the middle. Rather, it splits each tile into a 2x2 grid, and each of those grids is only filled if there is another contiguous wall. Thus in many cases a LOS can only be blocked if there are two walls present. E.g.:

Code:
+-----+
|@#xxx|
|.....|
|.....|
+-----+

+-----+
|@....|
|.#...|
|..x..|
+-----+

+-----+
|@#xxx|
|.#xxx|
|..xxx|
+-----+
P.S. Inevitably I found another bug. Newest version attached. At least no one on this board will ever mistake me for competent
Attached Files
File Type: txt loser.c.txt (4.4 KB, 200 views)
d_m is offline   Reply With Quote
Old June 20, 2009, 02:08   #63
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
[QUOTE=PaulBlay;20794]
Quote:
Originally Posted by PowerDiver View Post
The suggested changes would make the following situation *not* LOS.

Code:
######################M
@
Frankly I think targetable / LOS at that distance is just greedy. ;-)
I agree. There are always plenty of suggestions on how to make the game easier, making it a little harder just this once won't hurt that much.
__________________
www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
My banding life on Buzzkill's ladder.
buzzkill is offline   Reply With Quote
Old June 20, 2009, 02:12   #64
etaomyx
Rookie
 
Join Date: May 2009
Location: Australia
Posts: 17
etaomyx is on a distinguished road
Quote:
Originally Posted by d_m View Post
To be clear: this is not the suggestion to make each tile into a 4x4 grid and use the middle. Rather, it splits each tile into a 2x2 grid, and each of those grids is only filled if there is another contiguous wall.
Ah I see, my example referred to a 4x4 grid system, sorry for not be more specific. I had thought the 2x2 system had been abandoned already; as you say, it suffers from potentially discontinuous shadows.

EDIT: Rats, my mistake.

Last edited by etaomyx; June 20, 2009 at 02:57.
etaomyx is offline   Reply With Quote
Old June 20, 2009, 02:18   #65
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by etaomyx View Post
But it's easy enough to manufacture an example of discontinuous sight in the 2x2 system as well:
Well, you're right about there being a discontinuity, although it's a different one than you marked--a contiguous group of 3 squares:

Code:
+----------+
|######xxxx|
|#....#xxxx|
|#....#xxxx|
|#....#...#|
|#@.#xxxxxx|
|####xxxxxx|
+----------+
I'm still not ready to give up 2x2; I don't find this discontinuity troubling (and imagine that the 4x4 system will also have similar cases). I guess we'll see what happens.
d_m is offline   Reply With Quote
Old June 20, 2009, 13:21   #66
Atanvarno
Rookie
 
Join Date: May 2009
Posts: 9
Atanvarno is on a distinguished road
Quote:
Originally Posted by PaulBlay View Post
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)?

How does the current system specifically differ from the above?

Are any of those points not possible?
I will refer to these five points as (1)-(5). I will not say anything about (4).

I think it is important to decide what should happen, when A shoots an arrow at B and there might be monsters or walls in between. I see at least to different options:

(a) There are one or two natural paths from A to B (given by Bresenham's algorithm). If one of these is free, then the arrow hits B. If both are blocked, then one is selected and the arrow hits the first obstacle on this path.

In this system (5) is impossible. If we require (1), then we get a FOV satisfying (2) and (3), but it is very restricted and does not look very good. If we only want (2) and (3), then there are probably many possibilities.

We could get (5) by a hack: if the arrow (or spell) would hit something that could not be hit directly, then it will not hit, but it will drop on the floor (or the spell will do nothing). This would cause beam spells to have "holes".

(b) Calculate FOV for A treating monsters as walls. If B is visible, then the arrow hits B. Otherwise it hits something in between A and B.

FOV and "something in between" can be defined so that (1) and (5) are satisfied. If we also require (2), then we can't get (3). This leads to a very permissive FOV, and again there are small issues with beam spells.
Atanvarno is offline   Reply With Quote
Old June 20, 2009, 19:48   #67
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
[QUOTE=PaulBlay;20794]
Quote:
Originally Posted by PowerDiver View Post
The suggested changes would make the following situation *not* LOS.

Code:
######################M
@
Frankly I think targetable / LOS at that distance is just greedy. ;-)
So you don't think you should be able to see the outline of a large lit room when you enter it adjacent to a wall?

This is a key question. If the M horizontally next to a # has an expanding cone of shadow, it cannot see the @. By symmetry, the @ cannot see all of the walls of the room. There is no way around this without changing one of those properties.
PowerDiver is offline   Reply With Quote
Old June 20, 2009, 20:04   #68
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,736
Donated: $40
Pete Mack is on a distinguished road
[QUOTE=PowerDiver;20869]
Quote:
Originally Posted by PaulBlay View Post

So you don't think you should be able to see the outline of a large lit room when you enter it adjacent to a wall?

This is a key question. If the M horizontally next to a # has an expanding cone of shadow, it cannot see the @. By symmetry, the @ cannot see all of the walls of the room. There is no way around this without changing one of those properties.
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.
Pete Mack is offline   Reply With Quote
Old June 20, 2009, 21:10   #69
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
[QUOTE=Pete Mack;20870]
Quote:
Originally Posted by PowerDiver View Post

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.
You have to start with the assumption that a monster in a square is at least as far forward as "flush with the surface" or you screw up the gameplay. Basically, if the monster or player doesn't want to be targeted he needs to take another step back.

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.
PowerDiver is offline   Reply With Quote
Old June 20, 2009, 21:40   #70
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,939
Donated: $8
buzzkill is on a distinguished road
Given that each grid contains a 5x5 sub grid, instead of the previously discussed 4x4... (asterisks represent blank space)
Code:
*****   < player    *****   < horizontal     *###*   < corner
*@@@*               #####     wall           *###*
*@@@*               #####                    ####*
*@@@*               #####                    ####*
*****               *****                    *****
I think that PD's suggestion would work well, and could lead to some other interesting changes such as monsters of varying size, the larger ones being easier to see and therefore target.

Code:
tiny      medium    man       giant     massive
*****     *****     *****     *@@@*     @@@@@
*****     **@**     *@@@*     @@@@@     @@@@@
**@**     *@@@*     *@@@*     @@@@@     @@@@@
*****     **@**     *@@@*     @@@@@     @@@@@
*****     *****     *****     *@@@*     @@@@@
You would just have to target from the center of the attacker to any exposed area of the target. This would easily preserve the hockey stick in man vs. man combat. (just ignore the different sizes if that's too off topic)

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.
__________________
www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
My banding life on Buzzkill's ladder.

Last edited by buzzkill; June 20, 2009 at 22:14.
buzzkill is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
feature request - disturb on reverse LOS PowerDiver Vanilla 2 May 18, 2009 06:46


All times are GMT +1. The time now is 13:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.