{"author_name":"Spiridios","cat":"LD  #18 - Enemies as Weapons - 2010","comments":[{"author_name":"","time":"September 5, 2010 7:35 am","epoch":1283690100,"text":"You can&#8217;t handle dynamic typing? Jeez, bro, I always thought dynamic typing made things easier.","spam":"N"}],"epoch":1283141940,"likes":0,"metadata":{"p_key":"69225","p_author":"Spiridios","p_authorkey":"506801","p_urlkey":"105028","p_title":"Postmortem (or I hate javascript!)","p_cat":"LD  #18 - Enemies as Weapons - 2010","p_event":"LD18","p_time":"1283141940","p_likes":"0","p_comments":"1","p_status":"UPD5","us_key":"506801","us_name":"Spiridios","us_username":"Spiridios","event_start":"1282262400","event_key":"4","event_name":"LD18"},"text":"<p>My <a href=\"http:\/\/www.ludumdare.com\/compo\/2010\/08\/22\/foiled\/\">foiled post.<\/a><\/p>\n <p>Things that went right:<\/p>\n <ul>\n <li>Cooking. I didn&#8217;t like the theme and had no ideas (and I&#8217;m pretty sure I voted for the theme). So I went and <a href=\"http:\/\/www.ludumdare.com\/compo\/2010\/08\/20\/23384\/\">cooked dinner<\/a> and ended up with a really good idea. Well, I thought so.<\/li>\n <\/ul>\n <p>Things that went wrong:<\/p>\n <ul>\n <li>I tried to get Slick 2D working a few hours before the compo started. I couldn&#8217;t get a simple blank screen up in an applet. So I gave up and switched to Canvas.<\/li>\n <li>I didn&#8217;t have a javascript framework ready ahead of time. I tried to shave some time off by re-implementing some of the code I used in LD17, but creating an engine in javascript just sucked a lot of time away.<\/li>\n <li>I needed path finding and grabbed a random javascript A* implementation off the web. Other than having issues integrating it, I also ran into performance issues. And in retrospect I&#8217;d have ran into licensing issues since there was no explicit license. This past week, I&#8217;ve been converting a fast implementation of A* to javascript. The old A* took 2,240 milliseconds to path a very simple blockade. The new A* took 100 milliseconds to path the same blockade. An order of magnitude better, awesome! Except I need less than 16 milliseconds to fit within a frame, so I need to break the algorithm up so I can compute it over several frames. In javascript. No thank you.<\/li>\n <li>I tried to write a game in javascript. Being weakly typed, I ran into so many bugs that should have been caught at compile time. Typo one variable name and the interpreter just creates an instance of it. Nice. I also ran into problems with firebug. Things like infinite loops causing the debugger to not function. Even if you put a breakpoint in <i>before<\/i> the infinite loop starts. I switched over to Chrome and had less issues. But I don&#8217;t think I&#8217;m ever going to write anything this complex in javascript again. Spending hours tracking down things that a compiler could&#8217;ve caught in seconds is not my idea of productivity.<\/li>\n <\/ul>\n <p>What I&#8217;ll do in the future:<\/p>\n <ul>\n <li>Check out and vet my tools ahead of time. I think I&#8217;ll try Unity. Or Slick 2D again (with more time spent getting to know it). Or anything that&#8217;s strongly typed. =p<\/li>\n <li>I may continue with my tower defense idea, because I still think it&#8217;s a good game. But I&#8217;m trashing the code I&#8217;ve got so far in favor of something more fun to develop in.<\/li>\n <\/ul>","time":"August 29th, 2010 11:19 pm","title":"Postmortem (or I hate javascript!)"}