Wednesday, November 14, 2007

JavaScript, how I loathe thee

Random complaint: state is the root of all evil. I'm trying to get all existing sprites to update their trajectories when the game property's changed, but the trajectory data is duplicated in so many places.

Of course, I knew this already (yay Haskell), but there seems to be inherent state to this problem that can't be programmed away. For example, bounce/gravity can distort a sprite's trajectory so that its present course doesn't match the specified value; this happens to a single sprite, so we can't have them all share the GameProps' value. So we're stuck trying to reset trajectories of some fraction of existing sprites.

Monday, November 12, 2007

Widgets done, integrating them

About a week ago, I was going to write an entry about the mental stresses that a startup puts on you. I was trying to figure out how to setup trajectories & actions, and create other sorts of complex behaviors where the options themselves may have parameters and recursive calls to other widgets. I felt very much like my brain was at capacity, and there was no way I could fit the problem into my head.

What a difference a week makes. We've got a fairly comprehensive widget library now, they look reasonably pretty in both IE and Firefox, and I just hooked the shooter archetype up to one.

Marc Andreesen's blog entry about the market "pulling" your startup along seems dead accurate. And it doesn't even have to be a huge market. Once you've got something up on the screen that looks like you'd use it yourself, it gets much easier to spend long amounts of time on it. It's like "Oh, look, I can fix that" and before you know it you've spent five hours on it and fixed a dozen bugs.

There's still lots to do, but I seem to be settling into a routine and getting into the project much more. It kinda reminds me of when I was little and would play with Capsella or Legos for hours at a time without realizing it was time for dinner.