{"id":1004,"date":"2012-08-19T01:37:01","date_gmt":"2012-08-18T22:37:01","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=1004"},"modified":"2014-06-05T19:02:35","modified_gmt":"2014-06-05T16:02:35","slug":"unlimited-2d-perlin-caves","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2012\/08\/19\/unlimited-2d-perlin-caves\/","title":{"rendered":"Unlimited 2D Perlin Caves"},"content":{"rendered":"<p><a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/UnlimitedPerlinCaves2D2\/\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1005\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2012\/08\/19\/unlimited-2d-perlin-caves\/unlimited_perlin_caves_terrain_2d\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/unlimited_perlin_caves_terrain_2D.jpg?fit=680%2C496&amp;ssl=1\" data-orig-size=\"680,496\" 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;}\" data-image-title=\"unlimited_perlin_caves_terrain_2D\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/unlimited_perlin_caves_terrain_2D.jpg?fit=300%2C218&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/unlimited_perlin_caves_terrain_2D.jpg?fit=680%2C496&amp;ssl=1\" class=\"alignnone size-full wp-image-1005\" title=\"unlimited_perlin_caves_terrain_2D\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/unlimited_perlin_caves_terrain_2D.jpg?resize=680%2C496\" alt=\"\" width=\"680\" height=\"496\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/unlimited_perlin_caves_terrain_2D.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/unlimited_perlin_caves_terrain_2D.jpg?resize=300%2C218&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>Never-ending Perlin Noise 2D caves. Quick test version, you can move around.. (see also version\/image#2 below)<\/p>\n<p><strong>Todo\/ideas:<\/strong><br \/>\n&#8211; Movement too fast<br \/>\n&#8211; Fog of War?<br \/>\n&#8211; Destructable walls? (Problem: How to save them? If you go back to same direction, map is generated on the fly from perlin..how it would know this block was destroyed?)<br \/>\n&#8211; Different materials? Sand? Stone?<br \/>\n&#8211; Random item spawns?<br \/>\n&#8211; Monsters?<br \/>\n&#8211; Try <a title=\"http:\/\/unitycoder.com\/blog\/2012\/04\/12\/improved-perlin-noise-algorithm\/\" href=\"http:\/\/unitycoder.com\/blog\/2012\/04\/12\/improved-perlin-noise-algorithm\/\" target=\"_blank\">Improved Perlin Noise<\/a>?<\/p>\n<p><strong>Added version 2.0:<\/strong><br \/>\n&#8211; Lights<br \/>\n&#8211; Mining laser<br \/>\n&#8211; Dirt &amp; Rock layers (rock cannot be destroyed with default laser)<br \/>\n&#8211; Block destruction<br \/>\n&#8211; MouseWheel camera zoom<br \/>\n&#8211; Particles on block destruction<\/p>\n<p><strong>Notes:<\/strong><br \/>\n&#8211; Whaaat?! There is buildin command in Unity, how did I not see it before(?): <strong><a title=\"Go to Mathf scripting documentation\">Mathf<\/a>.PerlinNoise()<\/strong><\/p>\n<p><strong>Webplayer:<\/strong><br \/>\n<a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/UnlimitedPerlinCaves2D\/\" target=\"_blank\">http:\/\/unitycoder.com\/upload\/demos\/UnlimitedPerlinCaves2D\/<\/a> (v1.0)<br \/>\n<a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/UnlimitedPerlinCaves2D2\/\" target=\"_blank\">http:\/\/unitycoder.com\/upload\/demos\/UnlimitedPerlinCaves2D2\/<\/a>\u00a0(v2.0)<\/p>\n<p><strong>Download source:<\/strong><br \/>\n<a title=\"http:\/\/unitycoder.com\/download\/index2.php?link=1342&amp;uid=un1t3c0d5r\" href=\"http:\/\/unitycoder.com\/download\/index2.php?link=1342&amp;uid=un1t3c0d5r\" target=\"_blank\">perlincaves.unityPackage<\/a> (js)<\/p>\n<p>&#8212;<\/p>\n<p>Image#2<\/p>\n<p><a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/UnlimitedPerlinCaves2D2\/\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1010\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2012\/08\/19\/unlimited-2d-perlin-caves\/perlin_cave_explorer_2d\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/perlin_cave_explorer_2D.jpg?fit=680%2C440&amp;ssl=1\" data-orig-size=\"680,440\" 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;}\" data-image-title=\"perlin_cave_explorer_2D\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/perlin_cave_explorer_2D.jpg?fit=300%2C194&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/perlin_cave_explorer_2D.jpg?fit=680%2C440&amp;ssl=1\" class=\"alignnone size-full wp-image-1010\" title=\"perlin_cave_explorer_2D\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/perlin_cave_explorer_2D.jpg?resize=680%2C440\" alt=\"\" width=\"680\" height=\"440\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/perlin_cave_explorer_2D.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/perlin_cave_explorer_2D.jpg?resize=300%2C194&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Never-ending Perlin Noise 2D caves. Quick test version, you can move around.. (see also version\/image#2 below) Todo\/ideas: &#8211; Movement too fast &#8211; Fog of War? &#8211; Destructable walls? (Problem: How to save them? If you go back to same direction, map is generated on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1010,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,3],"tags":[65,286,287,288,144,260,253,61,289,168,285],"class_list":["post-1004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-demos","category-unity3d","tag-2d","tag-caves","tag-chunks","tag-dirt","tag-minecraft","tag-noise","tag-perlin","tag-perlin-noise","tag-rock","tag-terrain","tag-unlimited"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/08\/perlin_cave_explorer_2D.jpg?fit=680%2C440&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-gc","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/1004","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=1004"}],"version-history":[{"count":7,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/1004\/revisions"}],"predecessor-version":[{"id":2979,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/1004\/revisions\/2979"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/1010"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=1004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=1004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=1004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}