Re: Field of view algorithm implementation problems



At Mon, 14 Jan 2008 14:25:36 -0800 (PST),
jice wrote:

On Jan 14, 10:36 pm, Elsairon <elsai...@xxxxxxxxx> wrote:
On 2008-01-14 22:11:55, mike3 <mike4...@xxxxxxxxx> wrote:

Bresenham won't help you. From your code, for a single-cell pillar,
the start slope correspond to the ray going through the pillar, the
end slope to the ray going through the cell at the right of the pillar
(for this octant). This is why you have artifacts because those two
rays may go through the same cells. For a single pillar, you should
have start slope = end slope, thus resulting in a shadow reduced to a
line.

I'm not entirely sure, but I recall that the original description of
the shadowcasting algorithm used the square corners, not centers...

--
Radomir `The Sheep' Dopieralski <http://sheep.art.pl>
Meden agan.
.



Relevant Pages

  • Re: Field of view algorithm implementation problems
    ... end slope to the ray going through the cell at the right of the pillar ...
    (rec.games.roguelike.development)
  • Re: Field of view algorithm implementation problems
    ... end slope to the ray going through the cell at the right of the pillar ... This is repeated until row 12 where we in column 8 hit a blocking cell. ...
    (rec.games.roguelike.development)
  • Re: Field of view algorithm implementation problems
    ... end slope to the ray going through the cell at the right of the pillar ... Once the algorithm reaches the rightmost cell within the scan it advances one row "outwards" and does a new scan. ... The original scan of row 12 then reached the end of its scan without encountering any more blocking cells. ...
    (rec.games.roguelike.development)
  • Re: Field of view algorithm implementation problems
    ... end slope to the ray going through the cell at the right of the pillar ... This is repeated until row 12 where we in column 8 hit a blocking cell. ... I saw a mistake in the calculation given. ...
    (rec.games.roguelike.development)
  • Re: Field of view algorithm implementation problems
    ... end slope to the ray going through the cell at the right of the pillar ... This is repeated until row 12 where we in column 8 hit a blocking cell. ... Slope of line that brushes by the lower left corner of the blocking cell next to 'a': ...
    (rec.games.roguelike.development)