{"author_name":"natpat","cat":"LD #21","comments":[{"author_name":"Felipe Budinich","time":"August 23, 2011 12:09 pm","epoch":1314119340,"text":"Thanks for the cookie, and don&#8217;t worry, I actually like long detailed post mortems","spam":"N"}],"epoch":1314114300,"likes":0,"metadata":{"p_key":"63687","p_author":"natpat","p_authorkey":"3501","p_urlkey":"99472","p_title":"Post Mortem: DRUGSDRUGSDRUGS","p_cat":"LD #21","p_event":"LD21","p_time":"1314114300","p_likes":"0","p_comments":"1","p_status":"UPD5","us_key":"3501","us_name":"natpat","us_username":"natpat","event_start":"1313712000","event_key":"7","event_name":"LD21"},"text":"<p>Firstly, timelapse:<\/p>\n <p><a href=\"http:\/\/www.youtube.com\/watch?v=M5UoTeDj7jA\">http:\/\/www.youtube.com\/watch?v=M5UoTeDj7jA<\/a><\/p>\n <p>Well, that&#8217;s my second LD done. As with last time, I&#8217;m very pleased with what I got done in the time I had.<\/p>\n <p>This post mortem is very long. Sorry.<\/p>\n <p><span id=\"more-70543\"><\/span><\/p>\n <div id=\"attachment_70545\" style=\"width: 560px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/08\/23\/post-mortem-drugsdrugsdrugs\/ludumdare21-2\/\" rel=\"attachment wp-att-70545\"><img class=\"size-large wp-image-70545\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Ludumdare211-550x293.png\" alt=\"\" width=\"550\" height=\"293\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Ludumdare211-300x160.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Ludumdare211-550x293.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Ludumdare211.png 750w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><p class=\"wp-caption-text\">The finished drug - uh, I mean product.<\/p><\/div>\n <p><strong>PART 0 &#8211; The Idea (03:00 &#8211; 16:00)<\/strong><\/p>\n <p>After seeing what the theme was, I was \u00a0initially disappointed. Escape wasn&#8217;t one of my favourite themes on the list. But, as it was 3am in the morning for me, I went back to sleep.<\/p>\n <p>I had a longish car journey the first day too, so that set my back a few hours, and by the time I could finally get started, it was 4 in the afternoon, 13 hours gone. D:<\/p>\n <p>Luckily, that car journey had given me time to think of an idea I liked &#8211; the idea of drugs, and them being your &#8216;escape&#8217; from reality.<\/p>\n <p>What went well &#8211; Got an idea fleshed out<\/p>\n <p>What didn&#8217;t &#8211; Lost 12 hours of time.<\/p>\n <p><strong>Part 1 &#8211; The Base code (16:00 &#8211; 21:30)<\/strong><\/p>\n <p>I started by creating a simple platformer base. One of the things I had in mind to do was to create a system where you could walk through things, but jump on top of them too, if that makes sense. Somehow, this took me about 4 hours, and it didn&#8217;t even make it into the finished game.<\/p>\n <p>I then started work on the hand &#8211; this turned out quite well, but again, I wasted a lot of time debating about the best way to do it &#8211; in the end I ditched the walking animation completely and ended up coding the punch animation. However, having the hand as a\u00a0separate\u00a0entity worked in my favour later.<\/p>\n <p>What went well &#8211; Got a well fleshed out base code written.<\/p>\n <p>What didn&#8217;t &#8211; Messed about doing features I didn&#8217;t need and took ages.<\/p>\n <div id=\"attachment_70551\" style=\"width: 98px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/08\/23\/post-mortem-drugsdrugsdrugs\/doctor\/\" rel=\"attachment wp-att-70551\"><img class=\"size-full wp-image-70551\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Doctor.png\" alt=\"\" width=\"88\" height=\"100\" \/><\/a><p class=\"wp-caption-text\">The Doctor Spritesheet.<\/p><\/div>\n <p><strong>Part 2 &#8211; Enemies (21:45 &#8211; 00:40)<\/strong><\/p>\n <p><strong><\/strong>I then started work on the enemies &#8211; I used quite a lot of the code from the player, which saved a lot of time. I took a break from 22:00 &#8211; 22:30, then started working again.<\/p>\n <p>I bumped into a few problems with the hands &#8211; before the enemies were introduced, the hands were\u00a0referencing\u00a0the player directly. However, the enemies needed hands too, so I thought instead of having 2 hand classes, have one, and make it reference a new class, HasHands, which the Player and Enemy will extend from. I love OOP.<\/p>\n <p>I finished up the enemy code, then headed off to bed.<\/p>\n <p>What went well &#8211; Created robust enemy code.<\/p>\n <p>What didn&#8217;t &#8211; Spent a lot of time on polish that could have waited.<\/p>\n <p><strong>Part 3 &#8211; Sleep (00:40 &#8211; 8:30)<\/strong><\/p>\n <p>ZZZZZZZZZZZ (etc.)<\/p>\n <p>What went well &#8211; ZZZZZZZZZ<\/p>\n <p>What didn&#8217;t &#8211; ZZZZZZZ<\/p>\n <div id=\"attachment_70557\" style=\"width: 210px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/08\/23\/post-mortem-drugsdrugsdrugs\/drugs\/\" rel=\"attachment wp-att-70557\"><img class=\"size-full wp-image-70557\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Drugs.png\" alt=\"\" width=\"200\" height=\"200\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Drugs-150x150.png 150w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Drugs.png 200w\" sizes=\"(max-width: 200px) 100vw, 200px\" \/><\/a><p class=\"wp-caption-text\">DRUGS<\/p><\/div>\n <p><strong>Part 4 &#8211; DRUGS! (8:30 &#8211; 10:20)<\/strong><\/p>\n <p><strong><\/strong>Woke up refreshed after a good sleep and willing to start working again. I started work on the main point of the game &#8211; the drugs. I made the enemies drop them, and when they did, I made them fly out. Again, this polish could have waited, but in the end I think it was worth doing.<\/p>\n <p>I also created the explosion effect you see when you punch a doctor whilst on drugs &#8211; again, this is polish that could have waited, but it was something I always wanted to have, and I think it adds quite a lot. I ran into some problems getting the colours correct, and in the end, I ended up creating three different explosions all of different colours at the same time to give the impression of different colours. However, thanks to Flashpunk&#8217;s Emitter class, this was a doddle.<\/p>\n <p>What went well &#8211; Got another piece of the main game done.<\/p>\n <p>What didn&#8217;t &#8211; Got stuck on the explosion code for a while.<\/p>\n <div id=\"attachment_70568\" style=\"width: 160px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/08\/23\/post-mortem-drugsdrugsdrugs\/p1030274\/\" rel=\"attachment wp-att-70568\"><img class=\"size-thumbnail wp-image-70568\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/P1030274-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><p class=\"wp-caption-text\">This place is beautiul.<\/p><\/div>\n <p><strong>Part 5 &#8211; Walk #1 (10:20 &#8211; 11:45)<\/strong><\/p>\n <p><strong><\/strong>I&#8217;m on holiday on the Isle of Skye at the moment, so we went out for a walk for a bit.<\/p>\n <p>What went well &#8211; I got some fresh air and a break.<\/p>\n <p>What didn&#8217;t &#8211; Lost time.<\/p>\n <p>&nbsp;<\/p>\n <p>&nbsp;<\/p>\n <p><strong>Part 6 &#8211; Finishing gaps (11:45 &#8211; 14:00)<\/strong><\/p>\n <p>I finished up most of the core game code here &#8211; made enemies able to hit you, made you able to pick up drugs, etc. I probably should have done this slightly earlier, but hey, at least I got it done. I got stuck on a bug, but it all worked out.<\/p>\n <p>What went well &#8211; Got things neatly finished up.<\/p>\n <p>What didn&#8217;t &#8211; Wasted time squashing bugs I made by trying to save time.<\/p>\n <p><strong>Part 7 &#8211; Walk #2 (14:00 &#8211; 17:00)<\/strong><\/p>\n <p><strong><\/strong>Went on another walk.<\/p>\n <p>What went well &#8211; I got some fresh air and a break and some ideas.<\/p>\n <p>What didn&#8217;t &#8211; Lost lots of time.<\/p>\n <p><strong>Part 8 &#8211; Fail hour (17:00 &#8211; 18:00)<\/strong><\/p>\n <p>This was probably my worst hour in this whole process. With 10 hours to go, I decided it would be a good idea to completely revamp the base game code and do something I&#8217;d never done before &#8211;\u00a0pseudo\u00a03D\/2.5D or whatever &#8211; basically, I decided to try and add another dimension to the game, so it resembled the flash beat em ups you see.<\/p>\n <p>To make a long story short, I failed. Miserably. I wasted an hour. Luckily I had made a backup, as I had an inkling this would happen.<\/p>\n <p>What went well &#8211; Nothing.<\/p>\n <p>What didn&#8217;t &#8211; Everything.<\/p>\n <div id=\"attachment_70588\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/08\/23\/post-mortem-drugsdrugsdrugs\/tile\/\" rel=\"attachment wp-att-70588\"><img class=\"size-full wp-image-70588\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Tile.png\" alt=\"\" width=\"300\" height=\"90\" \/><\/a><p class=\"wp-caption-text\">How I made the trippy background.<\/p><\/div>\n <p><strong>Part 9 &#8211; MORE DRUGS! (18:00 &#8211; 20:15)<\/strong><\/p>\n <p>Feeling a bit let down by my fail, I decided to create the background I had wanted &#8211; white tiles normally, and flashing coloured tiles when high.<\/p>\n <p>To start with, I tried having the Tiles tint a random colour, then use alpha to fade them out. This ended up lagging the game hugely. I mean a 60fps to 30fps drop. This obviously was not the way to go.<\/p>\n <p>After dinner to think about it, I tried reducing the explosion size, thinking that could have something to do with the lag, but no.<\/p>\n <p>I then tried having the 18 predefined tile colours you see up there, and selecting one of them randomly, but no, that didn&#8217;t work either. I then realised that it was the alpha that was the problem (which I should have realised, duh), and so created 10 tile sized white squares, each with a reducing alpha, and layered them over the top of the tiles. Horrah! It worked!<\/p>\n <p>I then finally started work on the effects of the drugs, which was really fun (in my timelapse you can see my playing the game for quite a while :&#8217;) )<\/p>\n <p>What went well &#8211; Regained my urge to work on the game, and created a nice looking background.<\/p>\n <p>What didn&#8217;t &#8211; How long it took me.<\/p>\n <p><strong>Part 10 &#8211; The aim of the game (20:15 &#8211; 22:30)<\/strong><\/p>\n <p>Running around punching doctors and getting high is all very well and all, but the game needed a real aim. So I added in the Craving Bar. The real pain here was making it balanced &#8211; having drugs restore the right amount, etc., but I think I got the difficulty ok.<\/p>\n <p>(I also had a pokemon battle against my brother here.)<\/p>\n <p>What went well &#8211; Had an awesome Pokemon battle.<\/p>\n <p>What didn&#8217;t &#8211; Took ages to get the balance right.<\/p>\n <p><strong>Part 11 &#8211; EVEN MORE DRUGS! (22:30 &#8211; 00:30)<\/strong><\/p>\n <p>Having three different drugs wasn&#8217;t really enough, so I started adding more. I ran into some problems with Flashpunk&#8217;s code &#8211; the screen&#8217;s xScale affected the whole screen, but with some quick poking round I was able to fix it.<\/p>\n <p>I also played the game a lot here. Which is a good sign, as it means it&#8217;s fun&#8230; or maybe I was just sleep deprived.<\/p>\n <p>What went well &#8211; Added a lot more fun to the game.<\/p>\n <p>What didn&#8217;t &#8211; Wasted time playing it.<\/p>\n <p><strong>Path 12 &#8211; Death &amp; Polish (00:30 &#8211; 3:00)<\/strong><\/p>\n <p>I realised I hadn&#8217;t actually made you die, so I hastily coded that in.<\/p>\n <p>I created a title screen, and added in some instructions that appear at the beginning.<\/p>\n <p>With about half an hour to go, I felt like just\u00a0surviving\u00a0wasn&#8217;t enough. I quickly added in a high score system in for collecting drugs, and with about 15 minutes to go, I had finally finished. I gave it to IRC for some testing, fixed a few bugs, submitted it and collapsed into bed.<\/p>\n <p>What went well &#8211; I finished!<\/p>\n <p>What didn&#8217;t &#8211; I had to rush to do it.<\/p>\n <p>All in all, I think it went very well. And I just realised this turned into a 1300 word essay. Ah well. Have a cookie for getting through it:\u00a0<a href=\"http:\/\/www.techbusy.org\/wp-content\/uploads\/2011\/04\/web_browser_cookie.gif\">http:\/\/www.techbusy.org\/wp-content\/uploads\/2011\/04\/web_browser_cookie.gif<\/a><\/p>\n \n <p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/post-mortem\/\" rel=\"tag\">post-mortem<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/postmortem\/\" rel=\"tag\">postmortem<\/a><\/p>","time":"August 23rd, 2011 10:45 am","title":"Post Mortem: DRUGSDRUGSDRUGS"}