Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: 2D field of view demo. Parent comment
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.
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.