{"id":43225,"date":"2018-07-17T06:00:58","date_gmt":"2018-07-17T10:00:58","guid":{"rendered":"http:\/\/shamusyoung.com\/twentysidedtale\/?p=43225"},"modified":"2018-07-16T12:28:41","modified_gmt":"2018-07-16T16:28:41","slug":"i-made-a-thing","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=43225","title":{"rendered":"I Made a Thing"},"content":{"rendered":"<p>People have been saying things like, &#8220;Hey Shamus, what happened to those programming posts you were doing. Weren&#8217;t you in the middle of a project? Weren&#8217;t you wrapping up a project? What&#8217;s going on?&#8221;<\/p>\n<p>Here&#8217;s the thing:<\/p>\n<p>A friend of mine has been working on a Minecraft-style cube world where the front end is built on C++ and the backend runs on user-editable LUA scripts. Early in the project I was talking about some of the techniques I&#8217;d used to generate blockworld caves. Then I figured it was sort of lame to just <em>describe<\/em> the structures I was talking about, and it would make so much more sense to <em>show<\/em> him. And hey, why not kill two birds with one stone? I&#8217;ll make a blockworld to demo the caves, and I could turn the process into blog posts.<\/p>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/deeps4.jpg' width=100% alt='Ooooh. Spooky! Sorta.' title='Ooooh. Spooky! Sorta.'\/><\/div><div class='mouseover-alt'>Ooooh. Spooky! Sorta.<\/div><\/p>\n<p>But then I just kept adding to it. I finally got over the initial hurdle of working with Unity and reached the point where I could write code without needing to stop after three minutes of coding to do thirty minutes of forum-diving to answer simple questions. It was fun, so I kept going.<\/p>\n<p>&#8220;I&#8217;ll turn this into blog posts when I&#8217;m done,&#8221; I lied to myself.<br \/>\n<!--more--><br \/>\nBy the end, I&#8217;d made a block world, several layers of underground caves, a primitive building &#8220;interface&#8221;, a day\/night cycle, a lunar cycle, the surface world with different biomes, and a system for importing Blender models. Oh, and I&#8217;d made a few blender models.<\/p>\n<p>But then I found out <a href=\"?p=42777\">I&#8217;d lost all my GTA footage<\/a> and needed to re-capture it. And then I started writing about Andromeda. And when that&#8217;s done I have a novel and a videogame waiting for me. And when all of that is over we&#8217;ll be near the end of 2018 and I won&#8217;t have any memory of this project.<\/p>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/deeps1.jpg' width=100% alt='It&apos;s JUST LIKE MINECRAFT, except without the mods, interface, multiplayer, or gameplay.' title='It&apos;s JUST LIKE MINECRAFT, except without the mods, interface, multiplayer, or gameplay.'\/><\/div><div class='mouseover-alt'>It&apos;s JUST LIKE MINECRAFT, except without the mods, interface, multiplayer, or gameplay.<\/div><\/p>\n<p>So in an effort to make it count for <em>something<\/em>, here it is. You can download the non-game <a href=\"http:\/\/shamusyoung.com\/files\/TheDeepsPlayer.zip\">here<\/a>.<\/p>\n<p>The controls:<\/p>\n<pre lang=\"cs\">\r\nF1 - Help screen\r\nF2 - Spectator \/ flycam\r\nF3 - Show a bunch of dev info.\r\nF5 - Reset position.\r\n~ - Open the useless console window.\r\nI - Invert mouse.\r\nMousewheel - Change the block in your hand.\r\nLeft Mouse - Place block.\r\nRight Mouse - Destroy block.\r\nMiddle Mouse - Select block \/ clear hands.\r\nSpace - Jump.\r\nF12 - Exit.\r\n[ and ] - Forward \/ backward time lapse for daylight + lunar cycle.\r\n<\/pre>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/deeps2.jpg' width=100% alt='I made those trees in Blender. Honestly, that was more difficult and confusing than writing the code that drives the game.' title='I made those trees in Blender. Honestly, that was more difficult and confusing than writing the code that drives the game.'\/><\/div><div class='mouseover-alt'>I made those trees in Blender. Honestly, that was more difficult and confusing than writing the code that drives the game.<\/div><\/p>\n<p>Making this useless demo is probably not the best way I could have spent those hours, but what can you do?<\/p>\n<p>I will say Unity is pretty amazing once you absorb enough of it to get work done. I don&#8217;t know if I&#8217;d actually use it for something resource-intensive like a full-blown blockworld, but for any project where you&#8217;re not pushing against challenges with memory usage and draw distance, this is my now my go-to tool.<\/p>\n<p>Also, the default Unity workflow is not mod-friendly. When you&#8217;re working on the project, you&#8217;ve got all your files in a nice clear directory structure where you can modify individual bits of code, models, textures, sounds, and whatever else you&#8217;ve got. Then when you&#8217;re ready to deploy<span class='snote' title='1'>Fancy talk for &#8220;package up so non-developers can run it&#8221;.<\/span> it stuffs all those files into obfuscated proprietary files. Like, I don&#8217;t even know where my texture data IS in this deployed version. <\/p>\n<p><div class='imagefull'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/deeps3.jpg' width=100% alt='Yes, the grass waves in the breeze. No, it doesn&apos;t look particularly good.' title='Yes, the grass waves in the breeze. No, it doesn&apos;t look particularly good.'\/><\/div><div class='mouseover-alt'>Yes, the grass waves in the breeze. No, it doesn&apos;t look particularly good.<\/div><\/p>\n<p>If I wanted to make it so users could modify game assets, I&#8217;d have to implement a lot of resource-loading stuff by hand. That&#8217;s annoying. The files are RIGHT THERE in the development version, but I can&#8217;t get Unity to NOT hide them.<\/p>\n<p>Ah well. Hope it gives you two or three minutes of amusement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>People have been saying things like, &#8220;Hey Shamus, what happened to those programming posts you were doing. Weren&#8217;t you in the middle of a project? Weren&#8217;t you wrapping up a project? What&#8217;s going on?&#8221; Here&#8217;s the thing: A friend of mine has been working on a Minecraft-style cube world where the front end is built [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-43225","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/43225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43225"}],"version-history":[{"count":12,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/43225\/revisions"}],"predecessor-version":[{"id":43237,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/43225\/revisions\/43237"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}