Krice <
pau...@mbnet.fi> wrote:
>How would you use it? Because if there is a long narrow corridor
>then the precision of the map is not good enough to lit all tiles.
>None of the rays reach the unlit tile even it should be visible.
Y---*---*---*---*---*---*---*
| | | | | | | |
| A | | | | | | |
| | | | | | | |
########################X####
#############################
##########################B##
#############################
#############################
To compute the visibility of the tile containing B with a direct
Bresenham raycasting approach, calculate a line from A (the centre
of the visibility source's tile) to X (the "near corner" of the
target tile), not B (the centre of the target tile).
--
\_\/_/ turbulence is certainty turbulence is friction between you and me
\ / every time we try to impose order we create chaos
\/ -- Killing Joke, "Mathematics of Chaos"