{"id":74,"date":"2015-07-12T14:25:50","date_gmt":"2015-07-12T14:25:50","guid":{"rendered":"http:\/\/blog.qubekwest.com\/?p=74"},"modified":"2016-04-14T18:34:07","modified_gmt":"2016-04-14T18:34:07","slug":"slow-evolution","status":"publish","type":"post","link":"https:\/\/blog.qubekwest.com\/?p=74","title":{"rendered":"Slow Evolution"},"content":{"rendered":"<p>In general I don&#8217;t tend to spend a lot of time planning things before coding them. \u00a0I find that more often than not you can sit around and plan something so much that nothing ever gets done. \u00a0There are a couple of side effects to this approach. \u00a0I tend to get a lot done initially very quickly. \u00a0Then I tend to stall out a little. \u00a0The reason for the first part is pretty obvious. \u00a0If you don&#8217;t waste time planning you have all that extra time to get things done. \u00a0The second part is probably equally obvious but it&#8217;s just that unplanned code tends to require a fair bit of nudging around to correct for issues that arise from not planning it.<\/p>\n<p>Amusingly there is another pattern that produces a similar set of results. \u00a0It&#8217;s called a learning curve, and that&#8217;s both a problem I&#8217;m having and something that you can&#8217;t plan your way around. \u00a0As I attempt to learn more about how the graphics pipeline operates I also need to constantly rewrite bits of code because of new things I&#8217;ve learned. \u00a0I call this process &#8220;slow evolution.&#8221;<\/p>\n<p>I didn&#8217;t want to bury my learning curve alive in the extra bits that make up a game so I started by creating a &#8220;Geometry Practice&#8221; program. \u00a0I&#8217;ve already explained the difficulties I had with getting a single triangle on the screen so I won&#8217;t rehash that here, but this practice program is where that original piece of code lives.<\/p>\n<p>The evolution so far as gone a bit like this&#8230; \u00a0Start with the fight of getting a triangle on the screen, and do so with everything you need hard coded into the program. \u00a0Next decide that you want your shader programs to live in files on the disk instead of being hard coded and write the code to allow that to happen. \u00a0After that, get frustrated with hard coded geometry and realize that it might be a good idea to get those off the disk as well. \u00a0So stop and craft a file format for conveying the informational bits that make up geometry and write a parser to load them. \u00a0Next realize that you&#8217;ve got a few things coming flexibly off of the disk, but that which file being loaded is hard coded. \u00a0That means crafting something that allows your files to be selected from the command line. \u00a0Now that you can do fun things with the command line, make sure you allow that same system to tell the program about which shader files to load and which texture to load. \u00a0Now that you can provide information about which mesh file to load, add proper paths that let different types of geometry to be loaded (without breaking types you already had working, oops). \u00a0And so on&#8230;<\/p>\n<p>You get the idea. \u00a0I&#8217;m plugging along slowly evolving my practice program into the beginnings of the underlying graphics engine. \u00a0From hard coded to flexible to encapsulated modular flexibility.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In general I don&#8217;t tend to spend a lot of time planning things before coding them. \u00a0I find that more often than not you can sit around and plan something so much that nothing ever gets done. \u00a0There are a couple of side effects to this approach. \u00a0I tend to get a lot done initially &hellip; <a href=\"https:\/\/blog.qubekwest.com\/?p=74\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Slow Evolution<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-dev"],"_links":{"self":[{"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":4,"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions\/78"}],"wp:attachment":[{"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qubekwest.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}