{"id":2050,"date":"2017-08-02T13:57:11","date_gmt":"2017-08-02T04:57:11","guid":{"rendered":"http:\/\/www.codedojo.com\/?p=2050"},"modified":"2017-08-08T12:14:09","modified_gmt":"2017-08-08T03:14:09","slug":"the-last-e8-postmortem-ld39-and-a-unity-vs-ue4-thoughts","status":"publish","type":"post","link":"https:\/\/www.codedojo.com\/?p=2050","title":{"rendered":"The Last E8 postmortem (LD39) and some Unity vs UE4 thoughts"},"content":{"rendered":"<h1><\/h1>\n<div id=\"attachment_2055\" style=\"width: 650px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2055\" class=\"wp-image-2055 size-full\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld_header.png\" alt=\"\" width=\"640\" height=\"512\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld_header.png 640w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld_header-300x240.png 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld_header-624x499.png 624w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><p id=\"caption-attachment-2055\" class=\"wp-caption-text\">Presenting, the crappy game title I made! Akiko&#8217;s comment was &#8220;I didn&#8217;t know you were going to show my model up close, ugh&#8221;<\/p><\/div>\n<h1>The Last E8 Postmortem<\/h1>\n<p>Last weekend was the triannual Ludumdare game jam. \u00a0If you don&#8217;t know what that is, it&#8217;s a masochistic ritual where you voluntarily force yourself to create a new game over a weekend and publish it for all to see.<\/p>\n<p>Akiko pressured me into it as she wanted to <a href=\"https:\/\/www.blender.org\/\">Blender<\/a> up some things for practice. \u00a0I acquiesced to be her programming partner if we could come up with something to match the theme.<\/p>\n<p>The LD theme announced was &#8220;Running out of power&#8221;. This was 10 AM our time.<\/p>\n<h1>The Idea Phase<\/h1>\n<p>We agreed to think up some ideas and exchange them at lunch. \u00a0So in a Kyoto thai place Akiko showed me her idea:<\/p>\n<p><a href=\"http:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/coke_clicker.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2052 size-full\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/coke_clicker.jpg\" alt=\"\" width=\"1200\" height=\"900\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/coke_clicker.jpg 1200w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/coke_clicker-300x225.jpg 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/coke_clicker-768x576.jpg 768w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/coke_clicker-1024x768.jpg 1024w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/coke_clicker-624x468.jpg 624w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<p>Hmm. \u00a0I don&#8217;t know what to say about that except, I like it. \u00a0Something about being an employee who has to manage his drug use to stay productive. \u00a0(for the record, RTsoft does not endorse the use of illegal narcotics. \u00a0I do however, endorse the world&#8217;s favorite stimulant, coffee.)<\/p>\n<p>As for myself, I didn&#8217;t have much except a vague concept of celebrating the Tesla Model 3&#8217;s release with a game based on it somehow. \u00a03D flying game?<\/p>\n<p>So we starting working on Akiko&#8217;s idea &#8211; resolutely requiring that we completely nail down the game mechanics in photoshop or on paper before even starting.<\/p>\n<p>I figured there were two possible ways to take this:<\/p>\n<ul>\n<li><a href=\"https:\/\/youtu.be\/J7v0rgn5MJg?t=288\">Lemonade Stand style<\/a>: Strategic choices made, some kind of turns system. Mostly buttons and clicks.<\/li>\n<li><a href=\"http:\/\/orteil.dashnet.org\/cookieclicker\/\">Cookie Clicker<\/a> style: Also buttons and clicks, no real strategy but slowly building up your empire. (<em>I&#8217;m playing as I write this article. \u00a0Whee!<\/em>)<\/li>\n<\/ul>\n<p>I was appalled to find Akiko wasn&#8217;t aware of either game. You think you know somebody.<\/p>\n<p>I decided &#8220;Cocaine Clicker&#8221; was the way to go simply because I liked the name and according to google it wasn&#8217;t taken.<\/p>\n<p><em>Side note: I always google names because if I don&#8217;t, people will think I copied something else. \u00a0I sort of miss pre-internet days where you could just be original without caring if people thought you weren&#8217;t original.<\/em><\/p>\n<h1>Theme problems<\/h1>\n<p>I did some photoshop mockups of the buttons and tried to map out some gameplay.<\/p>\n<p>Unfortunately &#8220;Running out of power&#8221; didn&#8217;t really match what I&#8217;d designed; the concept of running an office, buying more employees and managing their illicit substance needs just didn&#8217;t work with it.<\/p>\n<p>A fundamental problem is you never run out of anything in a classical clicker game, you only gain.<\/p>\n<p>I did like her idea of a split screen, half being the office, and half being the drug farm\/factory. Sort of two games in one with a symbiotic relationship between them required for survival.<\/p>\n<h1>Engine problems<\/h1>\n<p>As I mulled this over I fired up my game engine for the first time. \u00a0I decided to use UE4 as that&#8217;s what I&#8217;ve had in my head in recently for some VR tests. \u00a0(<em>If you have a Vive, please <a href=\"http:\/\/www.codedojo.com\/?p=2066\">try my tech demo later!<\/a><\/em>)<\/p>\n<p>Lo and behold, UE4 was cursed. \u00a0I had setup a basic C++ UE4 project but was plagued by crashes and bugs. \u00a0I mean, I hadn&#8217;t even written any real code yet.<\/p>\n<p>The worst of it was the silent errors. \u00a0Sometimes something internally was broken that caused a setting to be grayed out that shouldn&#8217;t be. \u00a0I feel like the only way to be safe is basically restart the editor after every C++ class is added or a blueprint is reparented. Slow.<\/p>\n<p>Those issues are WORSE than a simple crash, because until it occurs to you to restart, your progress is entirely obstructed for unknown reasons. \u00a0I thought I had done something wrong, when I hadn&#8217;t.<\/p>\n<p>Knowing I probably had less than a day of total time to throw at this, I said screw it and used this jam as a chance to try out <a href=\"https:\/\/unity3d.com\/\">Unity 2017<\/a>. \u00a0(I&#8217;d used Unity 5 last year but forgot everything)<\/p>\n<p>I have to admit, Unity is nice. \u00a0The MS Visual Studio 2017 integration is fantastic these days. Zero crashes. \u00a0Breakpoint debugging worked immediately with no hoops to hop. Goodbye forever, MonoDevelop.<\/p>\n<p>I&#8217;m constantly switching back and forth between these two engines (plus <a href=\"http:\/\/protonsdk.com\">my own homegrown one<\/a>\u00a0for 2D and simple 3D) \u00a0so I&#8217;m going to pause for a second and show my current engine scorecard in this middleware battle royale.<\/p>\n<h1>Seth&#8217;s Unity VS UE4 scorecard:<\/h1>\n<p><strong>Unreal Engine 4:<\/strong><\/p>\n<ul>\n<li>Allows real C++ so the last twenty years of code doesn&#8217;t feel wasted<\/li>\n<li>Actually using that C++ causes editor glitches non-stop and longish compile times<\/li>\n<li>I think it&#8217;s faster overall and easier for me to replace the networking code with my own<\/li>\n<li>I don&#8217;t like the royalty scheme. \u00a0Being legally required to calculate royalties for eternity (assuming your game makes anything) is awful<\/li>\n<li>Blueprints may seem ok at first, but they are actually the spawn of satan as soon as you need to do anything slightly tricky. \u00a0Go ahead, write Vector3 vFinal = (vDir +vOffset).Normalize()*speed*dragMod); in BP, see what a mess that looks like. Now cut and paste it into a new entity and get forced to recreate and reconnect all the variables involved.<\/li>\n<li>Forced to choose between overly simplistic BP or slow compiling C++<\/li>\n<li>HTML5 support is questionable, doesn&#8217;t seem to be a priority. \u00a0Huge file sizes, rendering problems<\/li>\n<li>Full source code. \u00a0Makes this a good choice if you&#8217;re going to be implementing your own streaming landscape or enet networking.<\/li>\n<\/ul>\n<p><strong>Unity:<\/strong><\/p>\n<ul>\n<li>No C++. \u00a0C# isn&#8217;t bad, but I miss my direct pointer manipulation and huge library of code I&#8217;ve written, so it means a lot of porting, or using plugins that are less portable.<\/li>\n<li>Compile times are a dream<\/li>\n<li>No crashes, was 100% stable (so far, anyway)<\/li>\n<li>Better 3D import options, it can handle .blend files directly<\/li>\n<li>Better audio import options too, unlike UE4 it can properly handle a simple .mp3 file<\/li>\n<li>Excellent HTML5 support &#8211; nearly a must for a public game jam, more on this later<\/li>\n<li>Month to month licensing isn&#8217;t cheap for the Pro version, but at least they don&#8217;t have their hooks on your game royalties for eternity. \u00a0Free version isn&#8217;t bad either really<\/li>\n<li>No source code (well, not for peons like me, anyway)<\/li>\n<\/ul>\n<p>So in the end, I&#8217;m thinking I&#8217;m around 5X faster when using Unity simply because of faster compiling and smarter import options. \u00a0I guess I need to do a VR demo in Unity and test that side of things too though.<\/p>\n<h1>Screw it, let&#8217;s use Unity<\/h1>\n<p>In the end I told Akiko, look, I&#8217;m switching engines so how about I do a sort of simple 2D flying game as a refresher for me.<\/p>\n<p><em>&#8220;Can I still make 3D models in blender?&#8221;<\/em><\/p>\n<p><em>&#8220;Sure!&#8221;<\/em><\/p>\n<p><em>&#8220;Ok, I&#8217;m in. \u00a0What will the game be like?&#8221;<\/em><\/p>\n<p><em>&#8220;It will be like The Last V8 crossed with Space Taxi&#8221;<\/em><\/p>\n<p><em>&#8220;Never heard of those&#8221;<\/em><\/p>\n<p>The Last V8:<\/p>\n<p><iframe loading=\"lazy\" title=\"Mastertronic Chronicles - The Last V8 (1985) Game Review\" width=\"625\" height=\"469\" src=\"https:\/\/www.youtube.com\/embed\/CPzmPZoYu3s?start=249&#038;feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>Space Taxi:<\/p>\n<p><iframe loading=\"lazy\" title=\"Space Taxi - Commodore 64\" width=\"625\" height=\"469\" src=\"https:\/\/www.youtube.com\/embed\/KuRyiFg6FBY?start=139&#038;feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h1>Using Unity&#8217;s auto collision<\/h1>\n<p>I remembered this trick from when I made <a href=\"http:\/\/tankedgame.com\/taxi\">Multiplayer Space Taxi<\/a> a while ago, you can very easily add collision to a level simply from an image.<\/p>\n<div id=\"attachment_2053\" style=\"width: 1349px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_levelcollision.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2053\" class=\"wp-image-2053 size-full\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_levelcollision.jpg\" alt=\"\" width=\"1339\" height=\"874\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_levelcollision.jpg 1339w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_levelcollision-300x196.jpg 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_levelcollision-768x501.jpg 768w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_levelcollision-1024x668.jpg 1024w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_levelcollision-624x407.jpg 624w\" sizes=\"auto, (max-width: 1339px) 100vw, 1339px\" \/><\/a><p id=\"caption-attachment-2053\" class=\"wp-caption-text\">Unity&#8217;s magical Polygon Collider 2D component<\/p><\/div>\n<h1>About HTML5 vs native with game jams<\/h1>\n<p>Because this is my main development machine, long gone are the days where I can run unsigned binaries from people I don&#8217;t know. \u00a0I know, I hate that, but unless I setup a clean or virtual machine that&#8217;s just how it is.<\/p>\n<h1>Play our game<\/h1>\n<p><a href=\"http:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2056 size-full\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_a.jpg\" alt=\"\" width=\"600\" height=\"376\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_a.jpg 600w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2017\/08\/ld39_a-300x188.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>So finally, here is the game we made. \u00a0True to its heritage, it&#8217;s extremely hard. \u00a0Good luck!<\/p>\n<h1><a href=\"http:\/\/tankedgame.com\/ld39\">Play the game in your desktop browser here<\/a><\/h1>\n<p><a href=\"http:\/\/www.tankedgame.com\/ld39\/ld39_unity_source.zip\">Unity project\/source code here<\/a><\/p>\n<p>(also, the LDJAM site link for it is <a href=\"https:\/\/ldjam.com\/events\/ludum-dare\/39\/the-last-e8\">here<\/a>)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Last E8 Postmortem Last weekend was the triannual Ludumdare game jam. \u00a0If you don&#8217;t know what that is, it&#8217;s a masochistic ritual where you voluntarily force yourself to create a new game over a weekend and publish it for all to see. Akiko pressured me into it as she wanted to Blender up some [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,22,21],"tags":[],"class_list":["post-2050","post","type-post","status-publish","format-standard","hentry","category-development","category-ue4","category-unity"],"_links":{"self":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/2050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2050"}],"version-history":[{"count":13,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/2050\/revisions"}],"predecessor-version":[{"id":2069,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/2050\/revisions\/2069"}],"wp:attachment":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}