Postmortem (or I hate javascript!)

My foiled post.

Things that went right:

  • Cooking. I didn’t like the theme and had no ideas (and I’m pretty sure I voted for the theme). So I went and cooked dinner and ended up with a really good idea. Well, I thought so.

Things that went wrong:

  • I tried to get Slick 2D working a few hours before the compo started. I couldn’t get a simple blank screen up in an applet. So I gave up and switched to Canvas.
  • I didn’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.
  • 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’d have ran into licensing issues since there was no explicit license. This past week, I’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.
  • 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 before the infinite loop starts. I switched over to Chrome and had less issues. But I don’t think I’m ever going to write anything this complex in javascript again. Spending hours tracking down things that a compiler could’ve caught in seconds is not my idea of productivity.

What I’ll do in the future:

  • Check out and vet my tools ahead of time. I think I’ll try Unity. Or Slick 2D again (with more time spent getting to know it). Or anything that’s strongly typed. =p
  • I may continue with my tower defense idea, because I still think it’s a good game. But I’m trashing the code I’ve got so far in favor of something more fun to develop in.

Comments

05. Sep 2010 · 12:35 UTC
You can’t handle dynamic typing? Jeez, bro, I always thought dynamic typing made things easier.