{"assets":[],"author_link":"author\/doddler\/","author_name":"Doddler","cat":"LD #25","categories":["LD #25"],"comments":[],"epoch":1356118080,"event":"LD25","likes":4,"metadata":{"p_key":"78342","p_author":"Doddler","p_authorkey":"0","p_urlkey":"287352","p_title":"Nefarious Space Pirate Postmortem","p_cat":"LD #25","p_event":"LD25","p_time":"1356118080","p_likes":"4","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1355443200","event_key":"14","event_name":"LD25"},"source_url":"2012\/12\/21\/nefarious-space-pirate-postmortem\/","text":"<p><img alt=\"\" class=\"alignnone\" height=\"419\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/compo2\/thumb\/3cdd756273806546bbeab5b62802eb21.jpg\" width=\"450\"\/><\/p>\n<p>It\u2019s been almost a week since we started Ludum Dare, and have had a bit of a time to cool off since then. \u00a0Our team of three were able to put out a reasonably fun game for the Jam. \u00a0Some things went wrong, but I think we made a fun little game and the whole thing was an overwhelmingly positive experience.<\/p>\n<p><img alt=\"\" class=\"alignnone\" height=\"339\" src=\"http:\/\/puu.sh\/1DGrk\" width=\"575\"\/><\/p>\n<h3>What Went Wrong<\/h3>\n<p><strong>Thematic\u00a0Squabbling<\/strong>\u00a0\u2013 We spent a lot of time on this. The theme was weird, we wanted to take \u2018villain\u2019 to mean \u2018antagonist\u2019, but we couldn\u2019t really make it into something that worked or would have been fun. Eventually we just ran with the \u2018badguy\u2019 idea, but it would have been better to have something that was a little more clear cut.<\/p>\n<p><strong>Lack of Practice and Setup<\/strong> \u2013 Before this Ludum Dare, I was very rusty with unity, I hadn\u2019t worked in it in almost a year now. Our other programmer had only a passing familiarity with it, and our artist wasn\u2019t so much an artist as he was simply the most artistic of our group. We also didn\u2019t set up any of our tools prior, which lost us a bunch of time.<\/p>\n<p><strong>The maths<\/strong> \u2013 We got stuck for a good while to make the angles work. The game relies heavily on knowing the angle between the player and other actors, in relation to their current heading, but we spent and unreasonable amount of time just figuring out how to make it all work.<\/p>\n<h3>What Went Right<\/h3>\n<p><strong>Simple Setting<\/strong> \u2013 We chose to have the game take place in space. Space is a great setting, since there\u2019s absolutely nothing there. It saves us the time from having to do pathfinding, collisions, or obstacles. The trick is to keep it looking empty and to make it feel like you\u2019re moving, but I think we handled those well. It might feel like a bit of a cop-out, but<\/p>\n<p><strong>Build and Refine<\/strong> \u2013 Our primary goal was to have a working game as early as possible. I think we had a semi-working game with a player (an untextured cube at the time) and an enemy by the end of the first night (about 5 hours after start). At each step we would play it, think of what we could do to improve it, and work from there. While such a lack of direction might be considered a detriment to a bigger project, the fact that we had something working so early on meant that it was less directionless and more of a non-stop polishing process. If a feature looked complicated, we wouldn\u2019t add it.<\/p>\n<p><strong>Relaxed<\/strong> \u2013 We never felt rushed by our pace, we took regular breaks, slept normal hours, and even took time to watch some anime. \u00a0We also ended our jam after 48 hours, so it wouldn\u2019t cut into our Monday. The fact that we had a fairly solid, playable game without suffering from burnout when we went in to work on Monday was a good thing, and probably resulted in a better game.<\/p>\n<p><img alt=\"\" class=\"alignnone\" height=\"394\" src=\"http:\/\/puu.sh\/1DG4q\" width=\"489\"\/><\/p>\n<h3>Randomly Interesting Technical Bits<\/h3>\n<p>\u2013 The background is just a plane that faces the camera, that is movement locked with the player. There are two materials applied to it, which have their texture offset adjusted to a multiple of it\u2019s x\/y coordinates, to give the impression that you\u2019re moving through space, with the stars move slowly, and the dust moves much faster.<\/p>\n<p>\u2013 All the ships are actually cubes, because we had pains making the planes face the camera properly, and never went back to fix it.<\/p>\n<p>\u2013 If you look at the above picture, you\u2019ll see lines pointing from the police ships to a point near the player. What\u2019s actually happening is the police ships actually lead the player by a random amount. It\u2019s not really obvious in the final game because the shots are way too random to see it, which is a shame. When I first started testing, the enemy ships would all clump up when chasing you since they all had the same parameters and target, so I made the actual target random as well as randomized speed and turning rate.<\/p>\n<p>\u2013 The message box was originally going to be used for communications, as we were going to have both civilian and police ships send messages, but as the game pace increased, it ended up being difficult to follow while things were going on. Originally, we had messages simply flash at the top of the screen, but it became fairly annoying as a new message would appear every 5-10 seconds.<\/p>\n<p>\u2013 Collision detection doesn\u2019t work at all if the player or target ship isn\u2019t moving at all. I have no idea why this is, and it drove me insane while working on it, but since there\u2019s no way to actually come to a stop after you start it\u2019s not actually huge issue. Maybe it has to do with the way unity handles triggers. If you have any idea, I\u2019d love to know.<\/p>\n<p>\u2013 The arrows that point to each entity, probably one of my favorite features, was one of the easiest to code, taking maybe 30 minutes to do. Unity is kind of sexy that way, that it\u2019s so easy to make such a thing. <a href=\"https:\/\/github.com\/Doddler\/ld48game\/blob\/master\/Assets\/ArrowManager.cs\">Check out that code<\/a>.<\/p>\n<p>\u2013 The AI on the swat cruiser tries to fly along beside you and shoot at you from the side. It also cheats a lot, if it\u2019s off screen it\u2019s speed and turning ability is greatly increased, and if it can\u2019t get to the player for long enough it basically is launched high speed towards the player. I had thought the arrows would make it obvious it\u2019s cheating, but it seems fairly natural from your point of view aside from the odd \u201cwtf how did he get there\u201d. Or maybe you don\u2019t notice cause you\u2019re trying too hard to not explode.<\/p>\n<p>\u2013 I\u2019m especially proud of the taxi behavior. The taxi groups all start parented to a group object that moves on its own with the taxi\u2019s inside. When the group object detects a projectile nearby, it transfers the current direction and velocity to each of it\u2019s children and removes itself as the parent, at which point each of the ships starts moving\u00a0independently.<\/p>\n<h3>Timelapse<\/h3>\n<p><iframe allowfullscreen=\"\" frameborder=\"0\" height=\"281\" src=\"http:\/\/www.youtube.com\/embed\/wGuuP1iWUYQ?feature=oembed\" width=\"500\"><\/iframe><\/p>\n<p>A timelapse video from my computer perspective. 1 frame every 5 seconds, at 30fps. I should have used a dark theme for visual studio, don\u2019t watch if you dislike flashing images. <img alt=\":(\" class=\"wp-smiley\" src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/frownie.png\" style=\"height: 1em; max-height: 1em;\"\/><\/p>\n<h3>The game<\/h3>\n<p><strong><a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-25\/?action=preview&amp;uid=5375\">Give our game a shot! <\/a><\/strong><\/p>\n<p>Thanks for reading!<\/p>\n<p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/ld25\/\" rel=\"tag\">ld25<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/postmortem\/\" rel=\"tag\">postmortem<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/unity\/\" rel=\"tag\">unity<\/a><\/p>","time":"December 21st, 2012 7:28 pm","title":"Nefarious Space Pirate Postmortem","title_was_empty":false}