{"id":668,"date":"2009-08-17T10:07:57","date_gmt":"2009-08-17T10:07:57","guid":{"rendered":"http:\/\/www.visionriders.com\/blog\/?p=668"},"modified":"2014-07-28T15:23:31","modified_gmt":"2014-07-28T15:23:31","slug":"head-desk-much","status":"publish","type":"post","link":"https:\/\/www.visionriders.com\/blog\/2009\/08\/head-desk-much\/","title":{"rendered":"Head-Desk Much?"},"content":{"rendered":"<p>While plodding along in the production of <cite>AetherFall<\/cite>, I&#8217;ve been working quite a bit using the game&#8217;s internal editor to start piecing together the levels. Instead of wasting my time cobbling an overly complicated GUI together for something the player will never see, I took the easy way out. Fore example, if I&#8217;m placing a bit of scenery and want to scale it, I hold down the S key on the keyboard and scroll up on the mouse scrollwheel. In the editor, the scroll wheel does the lion&#8217;s share of everything that isn&#8217;t simple dragging and dropping.<\/p>\n<p>Only, for some reason, things wouldn&#8217;t always work how I wanted them. Continuing on with the scaling example, whenever I&#8217;d scroll up it would make scenery smaller instead of larger. &#8220;Oh,&#8221; I thought to myself, &#8220;I put ++ where I wanted &#8211;.&#8221; (In the C, C++, and C# programming languages these increase and decrease a value by one increment respectively.) So I switched them around and went on my way. Still, I seemed to be making this mistake an awful lot whenever I added new features to the editor. Every time I&#8217;d hold the key to alter something, scrolling up would decrease the value while scrolling down would increase it. &#8220;Oh bother, I&#8217;ve done it again.&#8221; And so I would go to fix it each time. But even for me, I seemed to be slipping up an awful lot.<\/p>\n<p>It wasn&#8217;t until today, some weeks after getting the first parts of the editor together, that I realized why I was making the same mistake over and over again. Put simply, I wasn&#8217;t making a mistake at all, at least not in the code for the editor. After skimming through the code for handling the mouse my true mistake became clear: I&#8217;d coded the game to signal scrolling up on the scrollwheel as scrolling down and vice versa. \ud83d\ude41<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While plodding along in the production of AetherFall, I&#8217;ve been working quite a bit using the game&#8217;s internal editor to start piecing together the levels. Instead of wasting my time cobbling an overly complicated GUI together for something the player will never see, I took the easy way out. Fore example, if I&#8217;m placing a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,22],"tags":[],"class_list":["post-668","post","type-post","status-publish","format-standard","hentry","category-aetherfall","category-programming"],"_links":{"self":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/comments?post=668"}],"version-history":[{"count":1,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/668\/revisions"}],"predecessor-version":[{"id":669,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/668\/revisions\/669"}],"wp:attachment":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/media?parent=668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/categories?post=668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/tags?post=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}