{"id":875,"date":"2014-10-16T15:20:16","date_gmt":"2014-10-16T15:20:16","guid":{"rendered":"http:\/\/www.visionriders.com\/blog\/?p=875"},"modified":"2014-10-16T15:20:16","modified_gmt":"2014-10-16T15:20:16","slug":"goodbye-c","status":"publish","type":"post","link":"https:\/\/www.visionriders.com\/blog\/2014\/10\/goodbye-c\/","title":{"rendered":"Goodbye, C#"},"content":{"rendered":"<p>I love C#. I really, really, <em>really<\/em> love C#. I got into the language because I wanted to develop for what then XBox Live Community Games (now known as XBox Live Indie Games), and Microsoft&#8217;s C# library XNA was the only way to do that. Once I got the general hang of it, using C# was the first time since fiddling around with QBasic as a kid that I actually <em>enjoyed<\/em> programming. I rarely felt like I had to &#8220;fight&#8221; the language to get things done, the way I usually do when working with C++. Sure, the language has its faults and quirks, and the lack of control over the garbage collector can be more than a little annoying, but it really is an all-around magnificent language to work in and so I love it to death.<\/p>\n<p>However, the current state of support for the language is a bit irksome to me. <cite>Another Star<\/cite> was coded completely in C#, built on top of a custom engine that interfaces with system APIs by way of a library called <a href=\"http:\/\/www.opentk.com\">OpenTK<\/a>. OpenTK always annoyed me a little, often depreciating entire sections of the library before the parts meant to replace it were even implemented, let alone completed.<\/p>\n<p>Just as <cite>Another Star<\/cite> was heading to release, a new major version of OpenTK finally came out, and it changed up the way a lot of the engine&#8217;s user input worked (keyboard, mice, gamepads, etc.). Trying to &#8220;correctly&#8221; implement these new designs has proven frustrating, as things I relied on have been removed without any real replacement. Some of these changes even led directly to bugs in <cite>Another Star<\/cite>; especially the Linux version. Bugs in the library also make it really difficult when trying to fix things, because I can never tell for sure whether something isn&#8217;t working because of my code or someone else&#8217;s. Or, for that matter, if I can even fix it.<\/p>\n<p>I knew, even before working on <cite>Another Star<\/cite>, that I would probably have to move to another C# library in the future. I continued to look for a suitable replacement, but never really found anything I liked. The closest I got was a C# wrapper around the widely used C\/C++ library SDL2, but it was little more than that: a wrapper. The syntax is pretty much just straight up C, without any attempt to translate it to C# conventions, at which point I feel like I might as well just code directly in C++.<\/p>\n<p>So I finally gave up and that&#8217;s exactly what I&#8217;ve been doing. The past month or so, I&#8217;ve been hammering out the beginning of a game in C++, the programming language that I&#8217;ve always had a loathing for (and, at times, outright hate). C++ is nearly forty years old at this point, and in that time has accumulated a <em>lot<\/em> of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Cruft\">cruft<\/a>. It&#8217;s gotten a lot of updates over the years to keep it relevant, with varying success, which has made it\u2014at least, in my opinion\u2014very ugly language, especially to look at.<\/p>\n<p>But the fact of the matter is that virtually all the important API libraries are written in C++. If I don&#8217;t want to build my game on top of somebody else&#8217;s code, this is my only recourse.<\/p>\n<p>I already regret my decision.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I love C#. I really, really, really love C#. I got into the language because I wanted to develop for what then XBox Live Community Games (now known as XBox Live Indie Games), and Microsoft&#8217;s C# library XNA was the only way to do that. Once I got the general hang of it, using C# [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-875","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/875","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=875"}],"version-history":[{"count":5,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/875\/revisions"}],"predecessor-version":[{"id":881,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/875\/revisions\/881"}],"wp:attachment":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/media?parent=875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/categories?post=875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/tags?post=875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}