{"id":15742,"date":"2012-04-30T04:02:49","date_gmt":"2012-04-30T09:02:49","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=15742"},"modified":"2012-04-30T07:26:33","modified_gmt":"2012-04-30T12:26:33","slug":"project-octant-part-1-introduction","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=15742","title":{"rendered":"Project Octant Part 1: Introduction"},"content":{"rendered":"<p>At PAX this year, during the Q&#038;A session at the Escapist Movie Night someone asked about Project Frontier.  This is still a thing people ask about. Remember Project Frontier? That was this thing:<\/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\/Q7BIaERfNs0\" frameborder=\"0\" allowfullscreen class=\"embed\"><\/iframe><br\/><small><a href='http:\/\/www.youtube.com\/watch?v=Q7BIaERfNs0'>Link (YouTube)<\/a><\/small><\/td><\/tr><\/table><\/p>\n<p>People ask me why I don&#8217;t work on it anymore. There are a lot of reasons, but the most important of which is: <em>Because it was done.<\/em><\/p>\n<p>It&#8217;s true that it wasn&#8217;t a game, and I occasionally talked and fantasized about making it into a game, but deep down my real driving goal was just to make my procedural generation ideas and prove they could work.  I thought it might be nice if someone took an interest in the project later, and I always hoped it might lead to opportunity the way some of my other projects did, but at the heart of it was a desire to validate my ideas with a working proof-of-concept.  <\/p>\n<p>Once I&#8217;d gotten to the video above, I had 90% of what I was after. Sure, I could have done ten times more work to finish a game and get the other 10%, but I&#8217;m sure you can see why that route wasn&#8217;t particularly alluring. I had bills to pay and a book to finish, and so Frontier was shelved.<\/p>\n<p>So almost exactly a year later, the programming bug has bitten again. I tried to ignore it so I could continue work on my next book. This resulted in me sitting with a blank look on my face, unable to write anything because I&#8217;d rather be programming. Which led to me closing the word processor and playing videogames, because I wasn&#8217;t getting anything done.<\/p>\n<p><!--more-->I&#8217;ve come to the conclusion that the only way to get moving on any of these other projects is to get the programming bug cured as quickly as possible. I can spend a couple of weeks staring into space, or I can spend them writing code. Might as well write code.<\/p>\n<p>I seriously considered working on this project in the dark. I&#8217;ve already invested several days into the project, and I&#8217;m only writing about it now because I seem to work better when I can write about what I&#8217;m doing.  And since I&#8217;m writing, I might as well make them blog posts, right? <\/p>\n<p>I know what people are going to say. &#8220;Ugh. A MINECRAFT CLONE.&#8221; In fact, I&#8217;ve already gotten this treatment from a friend, so I can only imagine how THE INTERNET will respond. <\/p>\n<p>However, there are a couple of technology ideas I want to play with, and doing a Minecraft -style world is the simplest and most direct means of playing around with those ideas. <\/p>\n<p>There are three main concepts that I want to explore:<\/p>\n<h3>1. The Qt Development Environment<\/h3>\n<p>I want to mess around with <a href=\"http:\/\/qt.nokia.com\/products\/\">Qt<\/a>. This is a cross-platform SDK AND development environment. This is odd. The development environment is where a programmer works. They generally look like this-ish:<\/p>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><a href='images\/ide_vs2010.jpg'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/ide_vs2010_small.jpg' class='insetimage' width='600' alt='ide_vs2010_small.jpg' title='ide_vs2010_small.jpg'\/><\/a><\/td><\/tr><\/table><\/p>\n<p>It&#8217;s basically to coding what a word processor is to writing. You type in your code. You compile your program.  When it crashes, the <acronym title=\"Integrated Development Environment\">IDE<\/acronym> can help you find where. It provides a bunch of tools for keeping your code organized and managing the thorny <a href=\"?p=9557\">dependency issues<\/a> you might encounter.<\/p>\n<p>There are a lot of these environments, usually many for whatever language you might want to use. Java, C#, Python, whatever. For nearly all of my career I&#8217;ve hammered away at Microsoft development environments. Once in a while I try something else, just to see if I&#8217;m missing out on anything. I keep coming back to Visual Studio. (I just accidentally typed that as &#8220;Visual Stupido&#8221;. Hm.) I&#8217;ve never been terribly impressed with Microsoft&#8217;s operating systems, but their developer tools are top-notch.<\/p>\n<p>But who cares, right? I mean, this is Qt:<\/p>\n<p><table width='600'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><a href='images\/ide_qt.jpg'><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/ide_qt_small.jpg' class='insetimage' width='600' alt='ide_qt_small.jpg' title='ide_qt_small.jpg'\/><\/a><\/td><\/tr><\/table><\/p>\n<p>It&#8217;s got different windows. So what? Well, we&#8217;ll see.  The pitch with Qt is that by using their tools you will be making 100% portable code. Write your program and it should run on PC, Macs, or X11. Since it&#8217;s generally free to use, it might be worth leaving behind Visual Studio. That&#8217;s the theory, anyway. The only way to really know how the Qt platform holds up is to write something meaningful with it. Any idiot can load up example programs and get them to compile.  It&#8217;s another thing to try to bend the tool to your will.<\/p>\n<h3>2. Octree<\/h3>\n<p>Octrees are a major concept in 3D programming, yet I&#8217;ve never written one. Hard to believe, but there it is.  <\/p>\n<p>An octree is a way of dividing up 3D space.  There are a lot of ways to use them.  In my own work, I&#8217;ve used a lot of quad trees in my day, which which is basically the same thing but in 2D form. (<a href=\"?p=142\">Like this.<\/a>) In fact, fair warning: Odds are good that at some point I&#8217;m going to call something a &#8220;quad tree&#8221; instead of an &#8220;oct tree&#8221;.  I&#8217;ve made that mistake several times in my own code over the past few days and then wondered why it wouldn&#8217;t compile. I guess I&#8217;ve typed the word &#8220;quad&#8221; a LOT of times in my career.<\/p>\n<p>An octree just takes a 3d space and divides it into eight sections by dividing it into half along every axis:<\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/2x2cube.jpg' class='insetimage'   alt='2x2cube.jpg' title='2x2cube.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>I&#8217;ll get into why it&#8217;s important later. <\/p>\n<p>Yes, this problem is &#8220;solved&#8221;. I could type &#8220;octree&#8221; into Google and get any number of open-source solution to the problem. In fact, Michael Goodfellow made one in his <a href=\"http:\/\/www.sea-of-memes.com\/LetsCode1\/LetsCode1.html\">very first entry of Let&#8217;s Code<\/a>. I could download his code and call this done.  But my goal isn&#8217;t to <em>have<\/em> an octree, but to <em>write<\/em> one.  It&#8217;s one thing to see a diagram showing you &#8220;this is how you use a crescent wrench&#8221;. It&#8217;s another to pick up a wrench and take something apart with it. Writing a bit of code can put the concept into your mind in a way that reading about it in the abstract really can&#8217;t.  The concept then becomes a general-purpose tool that you might be able to apply to different problems or use in new ways. <\/p>\n<h3>3. Perlin Noise<\/h3>\n<p>Here is where the Minecraft comparisons will come in, because to most people <code>octree+Perlin noise=Minecraft<\/code>.  Fine. But I still want to do it. <\/p>\n<p>So those are the goals. I have many other small goals in mind, but this is basically it. As with Project Frontier, this project could die at any time.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>At PAX this year, during the Q&#038;A session at the Escapist Movie Night someone asked about Project Frontier. This is still a thing people ask about. Remember Project Frontier? That was this thing: Link (YouTube) People ask me why I don&#8217;t work on it anymore. There are a lot of reasons, but the most important [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[233],"class_list":["post-15742","post","type-post","status-publish","format-standard","hentry","category-programming","tag-octant"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/15742","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=15742"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/15742\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}