{"id":1139,"date":"2011-04-19T12:38:43","date_gmt":"2011-04-19T11:38:43","guid":{"rendered":"http:\/\/positech.co.uk\/cliffsblog\/?p=1139"},"modified":"2011-04-19T12:38:43","modified_gmt":"2011-04-19T11:38:43","slug":"you-wouldnt-start-from-here","status":"publish","type":"post","link":"https:\/\/www.positech.co.uk\/cliffsblog\/2011\/04\/19\/you-wouldnt-start-from-here\/","title":{"rendered":"You wouldn&#8217;t start from here"},"content":{"rendered":"<p>So many programming, and technical things are bodged, not just in games or software, but everywhere, because the ideal best-case academic method is totally useless given that we are always working from an imperfect base.<\/p>\n<p>The railway network, telephone infrastructure, road network, sewers and god-knows-what-else here in England are all rubbish. Why? Because we got these things very early in history due to being economically and technologically quite advanced, esp during victorian times. As a result, as pioneers, we have what I guess is &#8216;first-mover disadvantage&#8217;. Our countries infrastructure is like excite vs today&#8217;s google :D<\/p>\n<p>I definitely find this problem in my own code, my own methods of working etc. I have an engine, it doesn&#8217;t really have a name, the folder is called &#8216;Positech Engine&#8217;. I save my imagination for the actual game&#8230; The engine isn&#8217;t like the unreal engine or other fully-featured thing, but it has all my library code which handles stuff like directinput, rendering, vertex buffer and texture management, file loading and so on. Bizzarely, 90% of the my UI code is NOT in the library, I copy it to each new game. How sucky.<\/p>\n<p>Not only that, but I have a bunch of long standing balls-ups that I am now stuck with, pending a major rewrite for the next game. I should have done them for this one, really&#8230; Here are the ones that spring to mind.<\/p>\n<p>STRINGS: I can&#8217;t decide if I like char* buffers or std::string. I pretty much use std::string, but because historically I know functions like sprintf and strcpy really well, I still use them in places. As a result some of my library stuff is designed to accept either std::string or char* as input. I can type &#8216;.c_str()&#8217; so fast now it&#8217;s scary<\/p>\n<p>UNICODE: I don&#8217;t use unicode. This means a Japanese GSB is not going to happen any time soon. I should probably use unicode, but I don&#8217;t<\/p>\n<p>TOOLTIPS: I know this seems minor, but my tooltip class isn&#8217;t integrated with my window class. This means if I create a new window, and it needs a tooltip, I need to add a tooltip object, and call a destructor, and make it respond to the mouse and get drawn. This sucks. I should have defaulted to all windows having tooltip functionality<\/p>\n<p>BUTTONS: Buttons should be a subset of windows, but mine aren&#8217;t. Both windows and buttons at least derive from the same class, but a window thus now derives from a buttonlist. That means a window has a list of buttons, and a list of child windows, and they are handled seperately. THIS SUCKS.<\/p>\n<p>I know this all sounds crap, and if you are a coder writing a new engine, or a student, it sounds like I&#8217;m a n00b, but the thing is, you wouldn&#8217;t start from here. Unfortunately I have, and re-using my existing engine saves me hundreds if not thousands of hours for each game, so it&#8217;s tough to make a business case for changing a lot of this. Both big studios I worked on had code that was at least as messy as this, so I know it&#8217;s not just me&#8230;<\/p>\n<p>Next game I&#8217;ll fix it all, sure&#8230;\u00a0\u00a0 maybe&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So many programming, and technical things are bodged, not just in games or software, but everywhere, because the ideal best-case academic method is totally useless given that we are always working from an imperfect base. The railway network, telephone infrastructure, road network, sewers and god-knows-what-else here in England are all rubbish. Why? Because we got<\/p>\n<p class=\"text-right\"><span class=\"screen-reader-text\">Continue Reading&#8230; You wouldn&#8217;t start from here<\/span><a class=\"btn btn-secondary continue-reading\" href=\"https:\/\/www.positech.co.uk\/cliffsblog\/2011\/04\/19\/you-wouldnt-start-from-here\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1139","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/1139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/comments?post=1139"}],"version-history":[{"count":1,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/1139\/revisions"}],"predecessor-version":[{"id":1140,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/posts\/1139\/revisions\/1140"}],"wp:attachment":[{"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/media?parent=1139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/categories?post=1139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.positech.co.uk\/cliffsblog\/wp-json\/wp\/v2\/tags?post=1139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}