Re: Intriguing new Line Of Sight algorithm (Java, Python)



On 15 Sty, 14:25, b0rsuk <jaze...@xxxxxxxxx> wrote:

I see. I've examined the other Python implementation (seems much
nicer, by the way) and it seems that it's not too hard to modify it to
stop expanding into thick walls. You may want to check it if you're
interested in improving it.
(I'm not sure if it actually speeds things up in some cases. Probably
yes. By the way, the workaround I proposed is not actually changing
the implementation, but the data you feed into it. Hopefully made
obsolete by that other version, I'll have a closer look.


I think going one tile behind walls is what this algorithm needs to
work properly. Only then, after merging inputs from potentially more
than one tile, it can decide if it should terminate the ray or not.
Anyway, I couldn't find a way to make it stop on the first wall tile
without breaking it...

The original implementation assumes that all obstacles are visible,
and the algorithm is used to determine what other tiles are visible,
not which obstacles. The obscure() method returns true for all walls,
visible or not (like those "deep" walls behind other walls). That's
why instead of a boolean value I've got 3 possible values (the FOV_*
constants): visible, visible obstacle, and obscured. For FOV
calculation, the last 2 values are the equivalent of the original
obscure() returning true, but from visibility point of view, the first
two values designate a visible tile.

I haven't had much time lately to look into libtcod's implementation
but I'm looking forward to it. The post processing step sounds
interesting. My current code produces artifacts - missing room
corners.

Grim
.



Relevant Pages

  • Re: 7drl: Happy Hunting released for Windows
    ... tile. ... You can also sometimes see tiles through walls at certain angles. ... healing potions along the way. ... if and when I get around to rewriting various parts of the option file ...
    (rec.games.roguelike.development)
  • Re: Removing tile mortared to plaster over brick
    ... The walls are, near as I can tell, brick with plaster over them (not ... There's a lot of ceramic tile on the walls, ... grinder for $15 as it's going to be chewed up by the dust. ...
    (alt.home.repair)
  • Re: Must I gut the bathroom?
    ... Big deal was the tile. ... I can probably take a sledge hammer to the old shower ... taking care not to muck the pipes. ... starting with updated plumbing, insulation, walls, and possibly even ...
    (alt.home.repair)
  • Re: installing wainscoting
    ... drywall, because behind the wainscotting you don't have to "finish mud" ... The walls are two 8 foot lengths of interior ... Both walls have baseboard forced hot water baseboards. ... To add another question to this thread, this same tile is used as a ...
    (alt.home.repair)
  • Re: new experimental FOV
    ... visible walls after it. ... square would turn into a floor tile (or a monster if one is standing ... the empty cell at the ... corridor intersection cannot be identified. ...
    (rec.games.roguelike.development)