{"id":20638,"date":"2013-08-15T07:05:32","date_gmt":"2013-08-15T12:05:32","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=20638"},"modified":"2015-07-01T03:42:46","modified_gmt":"2015-07-01T08:42:46","slug":"project-good-robot-part-1-not-project-good-robot","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=20638","title":{"rendered":"Project Good Robot 1: Not Project Good Robot"},"content":{"rendered":"<p>I have hinted about this on the Diecast, on the blog, on Spoiler Warning, to friends, and to anyone else that&#8217;s exchanged more than two words with me in the last couple of weeks. I have hinted at this so often that I really should stop calling it &#8220;hinting&#8221;. To wit: Yes, I&#8217;m programming again. <\/p>\n<p>But!<\/p>\n<p>The why is often as interesting as the what, so before I talk about what I&#8217;m working on let&#8217;s talk about what I&#8217;m <em>not<\/em> working on. Let&#8217;s jump back to three weeks ago&#8230;<\/p>\n<p>I&#8217;ve got this idea in my head for making a city of destructible buildings. Maybe it&#8217;s because we watched Pacific Rim recently and I&#8217;ve got building-pulverizing action in mind. I&#8217;m not sure WHAT &#8211; in gameplay terms &#8211; would destroy the buildings. Superheroes? Godzilla monsters? Missiles? I dunno. We&#8217;ll figure that out once we have a working demo of blasting away at a building until it falls over.<\/p>\n<p>The idea works like this:<\/p>\n<p><!--more-->I&#8217;d have a procedurally generated city of buildings.  The buildings would be made from voxel cubes, Minecraft-style. Note that the world isn&#8217;t made of Minecraft cubes. One of the drawbacks of Minecraft is the huge memory footprint required for huge volume of cubes.  But here each building would be its own local cube space and the area between, below, and above each building wouldn&#8217;t need to be tracked. This would give us a nice set of mutable data that doesn&#8217;t need to eat tons of memory or take tons of time to generate. Each little cube space would have its own local axis, which would mean the buildings don&#8217;t need to be aligned to the world axis. In plain terms, you could have buildings along curving roads and turned at an angle without turning their walls into jagged blocky diagonals. <\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/gr1_buildings.jpg' class='insetimage'   alt='gr1_buildings.jpg' title='gr1_buildings.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>Each building would have these conceptual support pillars going up through them. Every block must be within a certain distance of a support pillar to be considered&#8230; erm&#8230; supported. If we hit the building with an explosion, it will remove a volume of cubes. If a support pillar is broken, then we remove the pillar above the point of the break. After the explosion and particle effects go off, we re-evaluate the building again and look for cubes that lack support. Any cubes that are without support will be removed from the building and dropped as physics objects.<\/p>\n<p>This is not the problem.<\/p>\n<p>The problem is this:<\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/gr1_building.jpg' class='insetimage'   alt='gr1_building.jpg' title='gr1_building.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>No, not the yellow background. Although I do wish I could fathom why I set the background to yellow. Was that an accident? I can&#8217;t remember. Anyway, this looks too photo-realistic. I&#8217;m not saying it looks real, I&#8217;m saying it looks like it&#8217;s <em>trying<\/em> to look real, which is even worse.<\/p>\n<p>Remember Pixel City? That was this:<\/p>\n<p><table class='nomargin' cellspacing='0' width='100%' cellpadding='0' align='center' border='0'><tr><td><iframe loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/www.youtube.com\/embed\/-d2-PtK4F6Y\" frameborder=\"0\" allowfullscreen class=\"embed\"><\/iframe><br\/><small><a href='http:\/\/www.youtube.com\/watch?v=-d2-PtK4F6Y'>Link (YouTube)<\/a><\/small><\/td><\/tr><\/table><\/p>\n<p>One of the most common comments from people was that I should make a daytime version of this city and turn it into a GTA clone. I know these people are trying to encourage me, but that&#8217;s about the most annoyingly demoralizing thing to hear. It&#8217;s like if I drew these eyes:<\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/gr1_eyes.jpg' class='insetimage'   alt='gr1_eyes.jpg' title='gr1_eyes.jpg'\/><\/td><\/tr><\/table><\/p>\n<p><strong>Nice picture, Shamus.<\/strong><\/p>\n<p><em>Thanks, it was hard for me to-<\/em><\/p>\n<p><strong>But you should make a version where we can see the monster.<\/strong><\/p>\n<p><em>I.. what?<\/em><\/p>\n<p><strong>Yeah, just brighten it up a bit so we can see the face.<\/strong><\/p>\n<p>Pixel City was a cute trick, <a href=\"?p=2940\">which is what I set out to accomplish<\/a>. But it&#8217;s no use to us here. This problem is on a much larger and more complex scale. Somehow, I need to depict this building in a way that won&#8217;t scream &#8220;REALISM!&#8221;. I want cartoony, stylized, or some other cue for your brain that this is far removed from reality and shouldn&#8217;t be judged as such.<\/p>\n<p>So what do I do? Blocky pixel textures? Cell shading? Flat color? Ultra bright colors?<\/p>\n<p>The problem isn&#8217;t that this can&#8217;t be solved. The problem is that there are a dozen ways we could attempt to do it, and I have no idea which one might yield interesting results.  This is an art problem.  <\/p>\n<p>I suppose I could just proceed with the job I intended and ignore the visuals, but:<\/p>\n<ol>\n<li>If we build a huge city generator and THEN pick an art style, we could end up having to go back and re-write a lot of the building-maker code. This isn&#8217;t an art pipeline where we can ask an artist to make different things. We have to know what we want ahead of time.\n<li>It&#8217;s a real drain on enthusiasm to work on something that looks horrible. It&#8217;s like, &#8220;THIS? THIS IS WHAT I SPENT FOUR DAYS ON? WHAT AM I DOING WITH MY LIFE?&#8221;  It&#8217;s one thing if you&#8217;re coding for a paycheck, but if you&#8217;re doing it for fun then it needs to be fun.\n<\/ol>\n<p>As I ponder this, I realize that I&#8217;m always running into problems like this. Like, that was a big part of my job and my hobby programming for a decade and a half. There&#8217;s nothing wrong with that, but I&#8217;m suddenly feeling very restless. Do you know that in all my years of programming I&#8217;ve never written a single implementation of <a href=\"http:\/\/en.wikipedia.org\/wiki\/A*_search_algorithm\" title=\"A* search algorithm\">A*<\/a>? I&#8217;ve never written sound code. I&#8217;ve barely messed with physics and I&#8217;ve spent very little time with gameplay.<\/p>\n<p>So that&#8217;s what I&#8217;m going to do. I&#8217;m going to make a project specifically designed to let me blow past all the graphical hassles and work on the other stuff. <\/p>\n<p>Brace yourself. We&#8217;re going to move to 2D. <\/p>\n<p>EDIT: And to be clear, I&#8217;m not doing the destroying-buildings idea. I&#8217;m doing something else entirely. I say this because so many people are talking about <a href=\"http:\/\/en.wikipedia.org\/wiki\/Rampage_(video_game)\">Rampage<\/a> and I don&#8217;t want you getting your hopes up. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have hinted about this on the Diecast, on the blog, on Spoiler Warning, to friends, and to anyone else that&#8217;s exchanged more than two words with me in the last couple of weeks. I have hinted at this so often that I really should stop calling it &#8220;hinting&#8221;. To wit: Yes, I&#8217;m programming again. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[498],"tags":[],"class_list":["post-20638","post","type-post","status-publish","format-standard","hentry","category-good-robot"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/20638","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=20638"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/20638\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}