{"id":3322,"date":"2014-10-16T23:54:51","date_gmt":"2014-10-16T20:54:51","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=3322"},"modified":"2022-04-25T19:19:16","modified_gmt":"2022-04-25T16:19:16","slug":"2d-fog-of-war-unity","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2014\/10\/16\/2d-fog-of-war-unity\/","title":{"rendered":"2D Fog Of War"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3323\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2014\/10\/16\/2d-fog-of-war-unity\/fog_of_war_2d_sprites_unity_1\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2014\/10\/fog_of_war_2D_sprites_unity_1.jpg?fit=680%2C437&amp;ssl=1\" data-orig-size=\"680,437\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"fog_of_war_2D_sprites_unity_1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2014\/10\/fog_of_war_2D_sprites_unity_1.jpg?fit=680%2C437&amp;ssl=1\" class=\"alignnone size-full wp-image-3323\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2014\/10\/fog_of_war_2D_sprites_unity_1.jpg?resize=680%2C437\" alt=\"fog_of_war_2D_sprites_unity_1\" width=\"680\" height=\"437\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2014\/10\/fog_of_war_2D_sprites_unity_1.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2014\/10\/fog_of_war_2D_sprites_unity_1.jpg?resize=300%2C192&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>Got some nice looking Fog of War system working with sprites (2D)!<\/p>\n<p>It might eventually work on mobiles too (although at lower resolution..)<\/p>\n<p>*Will be posting it to asset store hopefully within this month..<\/p>\n<p>** Update 2022: Now after those &#8220;few months&#8221;, project sources are here <a href=\"https:\/\/unitycoder.com\/blog\/2022\/04\/25\/sources-fog-of-war-effect\/\" target=\"_blank\" rel=\"noopener\">https:\/\/unitycoder.com\/blog\/2022\/04\/25\/sources-fog-of-war-effect\/<\/a><\/p>\n<p><strong>Current features:<\/strong><br \/>\n&#8211; Adjustable showing &amp; hiding fade speeds<br \/>\n&#8211; Adjustable view range (circular)<br \/>\n&#8211; Optional view cone (with adjustable view angle, so that you see forward only, behind you will be black)<br \/>\n&#8211; Works with animated\/moving obstacles also<br \/>\n&#8211; Possible to have multiple players (each with viewing area)<br \/>\n&#8211; Resolution is adjustable (but higher resolution currently starts to slow down, can be optimized..)<br \/>\n&#8211; And more..<br \/>\n<strong>Webplayer demo:<\/strong><br \/>\n<a title=\"http:\/\/unitycoder.com\/upload\/demos\/2DFogOfWar\/\" href=\"http:\/\/unitycoder.com\/upload\/demos\/2DFogOfWar\/\" target=\"_blank\" rel=\"noopener\">http:\/\/unitycoder.com\/upload\/demos\/2DFogOfWar\/<\/a>\u00a0 (initial version, quite high resolution, not optimized)<\/p>\n<p>&#8212;<\/p>\n<p><em>(more images later)<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Got some nice looking Fog of War system working with sprites (2D)! It might eventually work on mobiles too (although at lower resolution..) *Will be posting it to asset store hopefully within this month.. ** Update 2022: Now after those &#8220;few months&#8221;, project sources are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3323,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[485,3],"tags":[65,269,663,205,40,280,172],"class_list":["post-3322","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-assets","category-unity3d","tag-2d","tag-dynamic","tag-fog-of-war","tag-indie","tag-shadow","tag-view","tag-visibility"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2014\/10\/fog_of_war_2D_sprites_unity_1.jpg?fit=680%2C437&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-RA","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/3322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=3322"}],"version-history":[{"count":4,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/3322\/revisions"}],"predecessor-version":[{"id":5538,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/3322\/revisions\/5538"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/3323"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=3322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=3322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=3322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}