{"author_name":"Deraj","cat":"LD #21","comments":[],"epoch":1313929980,"likes":0,"metadata":{"p_key":"64166","p_author":"Deraj","p_authorkey":"4936","p_urlkey":"99953","p_title":"Tools, Algorithms\u2026","p_cat":"LD #21","p_event":"LD21","p_time":"1313929980","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"4936","us_name":"Deraj","us_username":"deraj","event_start":"1313712000","event_key":"7","event_name":"LD21"},"text":"<p>When I started work on my LD21 entry, I have some vague notion that I was going to have to create maps, AI, and easy-to-use controls&#8230; but I really underestimated how much time all of these would take. It looks like I&#8217;ll be able to finish <em>something<\/em>, but I&#8217;ve already had to cut about 90% of the feature I originally planned <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/simple-smile.png\" alt=\":)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n <p><strong>Map Editor (4 hours): <\/strong>Rather than manipulating large arrays of numbers in my code, I decided to make a simple map editor. In the end, I&#8221;m sure this will pay off because editing the arrays by hand is very tedious (and error-prone as you get tired).<\/p>\n <p>Screenshot:<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/08\/21\/tools-algorithms\/editor3\/\" rel=\"attachment wp-att-66532\"><img class=\"size-medium wp-image-66532 alignnone\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Editor3-300x225.jpg\" alt=\"Map Editor\" width=\"300\" height=\"225\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Editor3-300x225.jpg 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Editor3-550x412.jpg 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/Editor3.jpg 800w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n <p><strong>Collision detection\/resolution (3 hours)<\/strong>: This was actually the first time I&#8217;d written collision detection for axis-aligned boxes and walls. Fixing all the issues where you could get &#8220;hung up&#8221; on walls was a little tricky, but now I&#8221;m happy with how responsive the controls are.<\/p>\n <p><strong>Enemy AI (2 hours)<\/strong>: This is still a work in progress. My original plan was to have enemies move about randomly. It took about 10 seconds of gameplay to realize that this would not work. To fix this, I had to add scripted paths (and update the map editor to handle this).<\/p>\n <p><strong>Line of Sight (2 hours)<\/strong>: Late last night, I realized that I needed honest-to-goodness line-of-sight testing to make the gameplay fun. I wasn&#8217;t totally sure how to go about implementing this and I was pretty tired, so I was little worried. Fortunately, I was able to come up with a very simple algorithm and implement it, even in a half-awake, half-asleep level of consciousness <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/simple-smile.png\" alt=\":)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n <p>Video: <a title=\"http:\/\/www.youtube.com\/watch?v=7WkDGD1BSZw\" href=\"http:\/\/www.youtube.com\/watch?v=7WkDGD1BSZw\">http:\/\/www.youtube.com\/watch?v=7WkDGD1BSZw<\/a><\/p>\n <p>Screenshot:<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/2011\/08\/21\/tools-algorithms\/lineofsight\/\" rel=\"attachment wp-att-66534\"><img class=\"alignnone size-medium wp-image-66534\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/LineOfSight-300x225.jpg\" alt=\"Line of sight demo\" width=\"300\" height=\"225\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/LineOfSight-300x225.jpg 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/LineOfSight-550x412.jpg 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/08\/LineOfSight.jpg 640w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>","time":"August 21st, 2011 7:33 am","title":"Tools, Algorithms\u2026"}