Live data from Hacker News

Show HN: 2D field of view demo

jsfiddle.net

51–60 of 80 posts

Re: Show HN: 2D field of view demo

#54
post #50

In case someone is interested in the design: https://bbcdn.githack.com/rmsundaram/tryouts/raw/e06259fffad... Devising the algorithm took around a month; did it in my free time. The implementation took a week, in HTML5 Canvas/JavaScript. Doing a 360°, not-bound-by-distance FoV would have been simpler, but FoV limited by both angle and distance took time. The idea is to find the field of view of an observer on a map wi…

Got a bug here: http://pasteboard.co/1vhAc3yM.png

Thanks! Seems to be a failing corner case, will look into it.

Re: Show HN: 2D field of view demo

#55
post #14

Old (June 2012), but still interesting related article: http://www.redblobgames.com/articles/visibility/

This is one of the references I'd cited, see the References section in the design document link I'd shared.

Whoops, so you did.

Re: Show HN: 2D field of view demo

#59
post #26

In case someone is interested in the design: https://bbcdn.githack.com/rmsundaram/tryouts/raw/e06259fffad... Devising the algorithm took around a month; did it in my free time. The implementation took a week, in HTML5 Canvas/JavaScript. Doing a 360°, not-bound-by-distance FoV would have been simpler, but FoV limited by both angle and distance took time. The idea is to find the field of view of an observer on a map wi…

Well done! It's almost the same algorithm I came up with in one sleepless night, 7 years ago. I used it in a game that was not finished: http://feiss.be/games/luxi (shameless Show HN)

This looks like something that could do well comercially today, you guys should pick it back up.
Post reply on HN