News for hackers. Stuff that matters.
Re:Show HN: 2D field of view demo by legends2k on Tuesday June 07, 2016 @03:48AM (#11853013)
> How much more complicated would it be if the obstacles were not polygons but points on a grid?

I think with grids, one approach would be to go with a flood fill kind of an algorithm, but doing it cell-by-cell will be costly.

An alternative way would be to unify cells together as a polygon and do intersection testing; with a hammer everything looks like a nail :P

I think in games like Baldur's Gate, [Portal Visibility](http://playtechs.blogspot.in/2007/03/2d-portal-visibility-pa...) is commonly used.

There are no comments on this comment yet.