{"author_link":"\/users\/herman-chau","author_name":"Herman Chau","author_uid":"herman-chau","comments":[],"epoch":1524282025,"event":"LD41","format":"md","ldjam_node_id":85772,"likes":8,"metadata":{"p_key":"109647","p_author":"Herman Chau","p_authorkey":"1003997","p_urlkey":"325568","p_title":"Implemented Line of Sight","p_cat":"LDJam ","p_event":"LD41","p_time":"1524282025","p_likes":"8","p_comments":"0","p_status":"WAYBACK","us_key":"1003997","us_name":"Herman Chau","us_username":"herman-chau","event_start":"1524182400","event_key":"72","event_name":"LD 41"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD41","removed_author":false},"_superparent":73256,"_trust":6,"author":3997,"body":"Implemented line of sight for my stealth roguelike now. The implementation is fairly standard I think: for each square within a distance of X of the player, use Bresenham's algorithm to look at all the squares connecting that square and the player and see if there are any walls. If not then that square is in the line of sight.\n\n![leon2.gif](\/\/\/raw\/d9f\/z\/f589.gif)","comments":4,"comments-timestamp":"2018-04-21T03:59:26Z","created":"2018-04-21T03:37:37Z","files":[],"files-timestamp":0,"id":85772,"love":8,"love-timestamp":"2018-04-21T04:38:18Z","meta":[],"modified":"2018-04-21T04:38:18Z","name":"Implemented Line of Sight","node-timestamp":"2018-04-21T03:40:25Z","parent":78856,"parents":[1,5,9,73256,78856],"path":"\/events\/ludum-dare\/41\/haka-the-robber\/implemented-line-of-sight","published":"2018-04-21T03:40:25Z","scope":"public","slug":"implemented-line-of-sight","subsubtype":"","subtype":"","type":"post","version":233702},"node_metadata":{"n_key":"85772","n_urlkey":"325568","n_parent":"78856","n_path":"\/events\/ludum-dare\/41\/haka-the-robber\/implemented-line-of-sight","n_slug":"implemented-line-of-sight","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"3997","n_created":"1524281857","n_modified":"1524285498","n_version":"233702","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/41\/haka-the-robber\/implemented-line-of-sight","text":"Implemented line of sight for my stealth roguelike now. The implementation is fairly standard I think: for each square within a distance of X of the player, use Bresenham's algorithm to look at all the squares connecting that square and the player and see if there are any walls. If not then that square is in the line of sight.\n\n![leon2.gif](\/\/\/raw\/d9f\/z\/f589.gif)","title":"Implemented Line of Sight","wayback_source":[]}