[{"data":1,"prerenderedAt":406},["ShallowReactive",2],{"project-11852783":3},{"id":4,"name":5,"line":5,"line_source":6,"title":7,"url":8,"domain":9,"maker":10,"posted_at":11,"year":12,"points":13,"comments":14,"rank_in_year":15,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":27,"sentiment":28,"stance_mix":29,"scored_comments":34,"aspects":35,"strip":43,"post_text":44,"what":45,"said":78,"maker_in_thread":169,"shape":177,"grid":182,"attempts":369,"same_week":370,"maker_shows":38,"maker_hidden":398,"reader_version":399,"card":400},"11852783","2D field of view demo","title","Show HN: 2D field of view demo","https:\u002F\u002Fjsfiddle.net\u002Flegends2k\u002Fbykd8usp\u002Fshow\u002F","jsfiddle.net","legends2k",1465281070,2016,333,76,52,2264,3,"legend","dev_tools","algorithm demo","web_app",[23,24,25,26],"field of view","line of sight","2d visibility","shadowcasting","debated",0.124,{"positive":30,"neutral":31,"mixed":32,"critical":33},9,7,0,6,22,{"idea":36,"docs":39,"execution":41,"design":42},{"positive":37,"critical":38},5,1,{"positive":40,"critical":32},2,{"positive":32,"critical":37},{"positive":38,"critical":32},[32,37,32,37,37,32,38,17,32,32,32,17,32,32,32,32,32,32,32,17,32,17,32,38,17,17,32,32,37,37,32,17,32,32,38,38,37,38,37,37],null,{"problem":46,"audience":44,"pricing":44,"motivation":53,"time_to_build":62,"stack":66,"openness":75,"stage":76,"team_size":77},{"value":47,"source":48,"evidence":49},"Computes an observer's field of view on a map with blocking polygons, and answers line-of-sight queries","maker",[50],{"id":51,"by":10,"text":52},"11852975","In case someone is interested in the design: https:\u002F\u002Fbbcdn.githack.com\u002Frmsundaram\u002Ftryouts\u002Fraw\u002Fe06259fffad9231172a65b66ed99406df4e051d1\u002FCG\u002FWebGL\u002FFoV\u002Fdesign.html Devising the…",{"value":54,"source":48,"evidence":55},"Existing FoV algorithms were closed source or had 360° unlimited range; maker wanted an angle and distance limited version",[56,59],{"id":57,"by":10,"text":58},"11853367","Thanks! Spent quite some time searching for the algorithm in Google, DDG, what-have-you, but didn't find something that does exactly what I want and also none that explains it…",{"id":60,"by":10,"text":61},"11860353","Thanks! > it bugs me some every time I see them say that they couldn't understand other people's explanations of how it works. I think I need to explain. Most of them explain…",{"value":63,"source":48,"evidence":64},"About a month to devise the algorithm and a week to implement",[65],{"id":51,"by":10,"text":52},[67,71],{"value":68,"source":48,"evidence":69},"JavaScript",[70],{"id":51,"by":10,"text":52},{"value":72,"source":48,"evidence":73},"HTML5 Canvas",[74],{"id":51,"by":10,"text":52},"open_source","launched","solo",{"praise":79,"objections":104,"requests":112,"questions":132,"alternatives":140},[80,96],{"value":81,"source":82,"evidence":83},"Well commented code and clear writeup","commenter",[84,88,92],{"id":85,"by":86,"text":87},"11853195","BasDirks","The code is very well commented! Great learning resource for anybody interested.",{"id":89,"by":90,"text":91},"11853038","intruder","This is really cool, appreciate the demo, source and the writeup. The debug view is beautiful. Great work.",{"id":93,"by":94,"text":95},"11853765","mar_tin","This looks great. Loved reading the writeup!",{"value":97,"source":82,"evidence":98},"Clean visualization and debug view",[99,100],{"id":89,"by":90,"text":91},{"id":101,"by":102,"text":103},"11855820","khedoros","Even with a known algorithm, it can be cool to see a clean visualization of it. OP was clever enough to figure it out, and that's great, but it bugs me some every time I see them…",[105],{"value":106,"source":82,"evidence":107},"Algorithm and technique are decades old and already used in classic games",[108],{"id":109,"by":110,"text":111},"11853319","Artlav","So... Can anyone explain what is so special or interesting about this? Both the idea and the algorithms are decades old and were already used in the 80s and 90s computer games…",[113],{"value":114,"source":82,"evidence":115},"Fix floating-point corner case bugs in rendering",[116,120,124,128],{"id":117,"by":118,"text":119},"11853685","Eun","Got a bug here: http:\u002F\u002Fpasteboard.co\u002F1vhAc3yM.png",{"id":121,"by":122,"text":123},"11852951","mrmattyboy","I found a bit of a weird 'bug', where I could get the POV to have a straight edge (rather than the curvature), if it's of any use: http:\u002F\u002Fimgur.com\u002Fa\u002FMPzGa",{"id":125,"by":126,"text":127},"11853136","Scea91","I found different bug. Might it be the same issue? https:\u002F\u002Fimgur.com\u002FRxaq72M",{"id":129,"by":130,"text":131},"11870339","blastseld","I found a bug http:\u002F\u002Fimgur.com\u002FVDQOT7o",[133],{"value":134,"source":82,"evidence":135},"How would the approach change for grid-based obstacles instead of polygons",[136],{"id":137,"by":138,"text":139},"11852903","MasterScrat","Interesting! How much more complicated would it be if the obstacles were not polygons but points on a grid? I've always been curious how the FoV was computed so fast in the…",[141,148,155,162],{"value":142,"source":82,"evidence":143},"Recursive shadowcasting (roguelikes)",[144],{"id":145,"by":146,"text":147},"11853966","Grue3","The algorithm is called \"recursive shadowcast\" and has long been used in roguelike games. I once implemented a vector adaptation of this algorithm for the groundbreaking non-tile…",{"value":149,"source":82,"evidence":150},"Red Blob Games visibility article",[151],{"id":152,"by":153,"text":154},"11853036","xabi","Old (June 2012), but still interesting related article: http:\u002F\u002Fwww.redblobgames.com\u002Farticles\u002Fvisibility\u002F",{"value":156,"source":82,"evidence":157},"Eric Lippert shadowcasting series",[158],{"id":159,"by":160,"text":161},"11853914","sclangdon","Good job OP. I personally found Eric Lippert's 6-part series (and playable Silverlight demo) on the subject fascinating. I didn't notice it referenced in your design document, so…",{"value":163,"source":82,"evidence":164},"Shadow mapping via Z-buffer",[165],{"id":166,"by":167,"text":168},"11853190","asQuirreL","This is some interesting work! I was musing about another algorithm to achieve the same effect, as I was reading: * First render the scene in 3D, from the viewer's position,…",{"comments":170,"answered":31,"key":171},24,[172,173,176],{"id":51,"text":52},{"id":174,"text":175},"11853201","Wow, the visuals look stunning, I like the noir theme!",{"id":57,"text":58},{"commenters":178,"max_depth":179,"maker_replies":170,"first_comment_mins":180,"lifespan_hours":181},40,10,39,149,[183,185,189,191,193,196,199,202,205,207,210,212,214,217,221,224,226,230,233,236,239,241,244,247,249,251,253,255,258,261,263,265,267,269,272,275,276,280,283,284,288,291,293,294,296,299,300,303,305,307,311,313,316,318,320,322,324,326,329,331,335,337,341,344,346,348,351,355,357,359,362,364,365,366],[51,32,32,184,10,38],"project\u002Fneutral\u002Fdocs",[186,32,37,187,188,32],"11853154","project\u002Fpositive\u002Fidea","feiss",[174,32,32,190,10,38],"commenter\u002Fneutral\u002Fnone",[192,32,32,190,188,32],"11853238",[194,32,32,190,195,32],"11860793","tobinfricke",[197,32,37,187,198,32],"11855325","Mahn",[200,32,32,190,201,32],"11856687","mettamage",[203,32,32,204,188,32],"11857772","other\u002Fneutral\u002Fnone",[85,32,37,206,86,32],"project\u002Fpositive\u002Fdocs",[208,32,32,204,209,32],"11853336","jasonkester",[57,32,32,211,10,38],"maker\u002Fneutral\u002Fidea",[117,32,38,213,118,32],"project\u002Fcritical\u002Fexecution",[215,32,32,216,10,38],"11853805","maker\u002Fneutral\u002Fexecution",[218,32,17,219,220,32],"11854227","maker\u002Fneutral\u002Fnone","peter-slovak",[222,32,32,204,223,32],"11867930","shurcooL",[225,32,32,190,10,38],"11868022",[227,38,32,228,229,32],"11853202","other\u002Fneutral\u002Fidea","thomasjonas",[231,38,32,204,232,32],"11855532","jdironman",[234,38,32,228,235,32],"11855996","nitrogen",[237,38,32,204,238,32],"11857919","partisan",[137,40,17,240,138,32],"project\u002Fneutral\u002Fidea",[242,40,32,204,243,32],"11852926","willvarfar",[245,40,32,246,10,38],"11852948","commenter\u002Fneutral\u002Fperformance",[248,40,32,246,243,32],"11852969",[250,40,32,246,10,38],"11852984",[252,40,32,246,243,32],"11852999",[254,40,32,246,10,38],"11853037",[256,40,32,204,257,32],"11853250","PavlovsCat",[259,40,32,204,260,32],"11856920","MonkeyDan",[262,40,32,228,257,32],"11860945",[264,40,32,204,260,32],"11863280",[266,40,32,204,257,32],"11863417",[268,40,32,240,10,38],"11853013",[270,40,32,204,271,32],"11853105","marvin",[273,40,32,228,274,32],"11853130","a_e_k",[145,17,32,228,146,32],[277,278,17,211,279,32],"11853058",4,"almightysmudge",[281,278,32,282,10,38],"11853068","maker\u002Fneutral\u002Fdocs",[166,37,17,240,167,32],[285,37,32,286,287,32],"11853261","commenter\u002Fneutral\u002Fidea","Chilinot",[289,33,32,204,290,32],"11853182","manuelflara",[292,33,32,204,10,38],"11853188",[121,31,38,213,122,32],[295,31,32,216,10,38],"11852956",[297,31,37,298,122,32],"11853015","maker\u002Fpositive\u002Fnone",[125,31,38,213,126,32],[301,31,32,302,10,38],"11853184","commenter\u002Fneutral\u002Fexecution",[304,31,17,216,126,32],"11853204",[306,31,32,216,10,38],"11853290",[308,309,32,228,310,32],"11853138",8,"foota",[312,309,32,190,10,38],"11853146",[314,309,32,228,315,32],"11853194","marxama",[159,30,37,317,160,32],"maker\u002Fpositive\u002Fidea",[319,30,32,190,10,38],"11868029",[89,179,37,321,90,32],"project\u002Fpositive\u002Fdesign",[323,179,32,190,10,38],"11853055",[152,325,32,228,153,32],11,[327,325,32,328,10,38],"11853046","commenter\u002Fneutral\u002Fdocs",[330,325,17,282,279,32],"11853908",[332,333,32,228,334,32],"11853395",12,"damptowel",[336,333,32,286,10,38],"11853429",[338,339,32,228,340,32],"11853595",13,"sakri",[342,339,32,343,10,38],"11853706","other\u002Fpositive\u002Fdocs",[129,345,38,213,130,32],14,[347,345,38,213,130,32],"11870345",[349,345,32,350,10,38],"11892968","project\u002Fneutral\u002Fexecution",[352,353,17,240,354,32],"11855755",15,"achikin",[93,356,37,206,94,32],16,[358,356,32,298,10,38],"11853786",[109,360,38,361,110,32],17,"project\u002Fcritical\u002Fidea",[363,360,32,286,10,38],"11853361",[101,360,37,187,102,32],[60,360,32,240,10,38],[367,360,37,187,368,32],"11859679","dang",[],[371,376,381,386,390,394],{"id":372,"name":373,"points":374,"category":375},"11846108","OneView Calendar",825,"productivity",{"id":377,"name":378,"points":379,"category":380},"11829237","YouTube Stay",295,"consumer_social",{"id":382,"name":383,"points":384,"category":385},"11849398","metrocosm.com",294,"data",{"id":387,"name":388,"points":389,"category":19},"11861926","Mega Boilerplate",268,{"id":391,"name":392,"points":393,"category":19},"11855158","CodeBlimp",113,{"id":395,"name":396,"points":397,"category":19},"11824203","Reactpack",108,false,"v2",{"id":401,"name":5,"line":5,"ai":398,"cat":19,"year":12,"points":13,"comments":14,"rec":27,"s":402,"top":17,"kw":403,"maker":10,"domain":9,"tier":18,"attempts":32,"strip":404,"url":8,"mix":405,"praise":81,"objection":106,"sub":20},11852783,0.12,[23,24,25,26],"0505501300030000000303013300550300115155",[30,31,32,33],1793990943687]